OSDN Git Service

BugTrack2/246: do_plugin_init(): KISS. $checked what => init $done
authorhenoheno <henoheno>
Mon, 18 Jun 2007 14:32:49 +0000 (23:32 +0900)
committerumorigu <umorigu@gmail.com>
Sat, 29 Nov 2014 06:09:47 +0000 (15:09 +0900)
lib/plugin.php

index b36c470..dae2214 100644 (file)
@@ -67,18 +67,18 @@ function exist_plugin_inline($name) {
                function_exists('plugin_' . $name . '_inline') : FALSE;
 }
 
-// Do init the plugin
-// NOTE: Returning FALSE from $func, means "an erorr occurerd"
+// Call 'init' function for the plugin
+// NOTE: Returning FALSE means "An erorr occurerd"
 function do_plugin_init($name)
 {
-       static $checked = array();
+       static $done = array();
 
-       if (! isset($checked[$name])) {
+       if (! isset($done[$name])) {
                $func = 'plugin_' . $name . '_init';
-               $checked[$name] = (! function_exists($func) || call_user_func($func) !== FALSE);
+               $done[$name] = (! function_exists($func) || call_user_func($func) !== FALSE);
        }
 
-       return $checked[$name];
+       return $done[$name];
 }
 
 // Call API 'action' of the plugin