Merge remote branch 'upstream/master'
This commit is contained in:
commit
1312bc742f
@ -53,8 +53,7 @@ alert("Found: {$photos->data->members[0]}");
|
||||
|
||||
|
||||
alert("Grab a random photo");
|
||||
$photos = Gallery3::factory($root->url, $auth)
|
||||
->set("random", "true")
|
||||
$photos = Gallery3::factory("{$root->url}?random=true", $auth)
|
||||
->load();
|
||||
alert("Found: {$photos->data->members[0]}");
|
||||
|
||||
|
@ -259,17 +259,20 @@ class Admin_Developer_Controller extends Admin_Controller {
|
||||
if (preg_match_all('#module::event\("(.*?)"(.*)\);#mU', $file_as_string, $matches, PREG_SET_ORDER) > 0) {
|
||||
foreach ($matches as $match) {
|
||||
$event_name = $match[1];
|
||||
$parameters = array();
|
||||
if (!empty($match[2]) &&
|
||||
preg_match_all('#\$[a-zA-Z_]*#', $match[2], $param_names)) {
|
||||
$display_name = ucwords(str_replace("_", " ", $event_name));
|
||||
if (!in_array($display_name, self::$event_list)) {
|
||||
$parameters = array();
|
||||
if (!empty($match[2]) &&
|
||||
preg_match_all('#\$[a-zA-Z_]*#', $match[2], $param_names)) {
|
||||
|
||||
foreach ($param_names[0] as $name) {
|
||||
$parameters[] = $name != '$this' ? $name : '$' . $event_name;
|
||||
foreach ($param_names[0] as $name) {
|
||||
$parameters[] = $name != '$this' ? $name : '$' . $event_name;
|
||||
}
|
||||
}
|
||||
self::$event_list["static function $event_name(" . implode(", ", $parameters) . ")"] = $display_name;
|
||||
}
|
||||
self::$event_list["static function $event_name(" . implode(", ", $parameters) . ")"] = $event_name;
|
||||
ksort(self::$event_list);
|
||||
}
|
||||
ksort(self::$event_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user