summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-09-29 09:10:41 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-09-29 09:10:41 -0700
commite6f62396111e2cd9aef8e3244851eca3ec65aee4 (patch)
tree905a98a22e4d9fb6edac5157b1b1957125a40309
parent89a67dba63f8ac61b90e4c4f1ba1b0cdbdf20b26 (diff)
Remove the @todo and optimize the gallery_event call for 3 and 4 arguments... context menu events have 4 arguments.
-rw-r--r--modules/gallery/helpers/module.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php
index ae8bcc11..8e203566 100644
--- a/modules/gallery/helpers/module.php
+++ b/modules/gallery/helpers/module.php
@@ -294,13 +294,18 @@ class module_Core {
case 2:
gallery_event::$function($args[0], $args[1]);
break;
+ case 3:
+ gallery_event::$function($args[0], $args[1], $args[2]);
+ break;
+ case 4: // Context menu events have 4 arguments so lets optimize them
+ gallery_event::$function($args[0], $args[1], $args[2], $args[3]);
+ break;
default:
+ Kohana::log("error", "Number of arguments: " . count($args));
call_user_func_array(array("gallery_event", $function), $args);
}
}
- // @todo: consider calling gallery_event first, since for things menus we need it to do some
- // setup
foreach (self::$active as $module) {
if ($module->name == "gallery") {
continue;