diff options
Diffstat (limited to 'classes/pluginhost.php')
-rw-r--r-- | classes/pluginhost.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 592629881..710435ae4 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -21,6 +21,7 @@ class PluginHost { const HOOK_RENDER_ARTICLE = 10; const HOOK_RENDER_ARTICLE_CDM = 11; const HOOK_FEED_FETCHED = 12; + const HOOK_SANITIZE = 13; const KIND_ALL = 1; const KIND_SYSTEM = 2; @@ -170,7 +171,7 @@ class PluginHost { } function add_command($command, $description, $sender) { - $command = "-" . str_replace("-", "_", strtolower($command)); + $command = str_replace("-", "_", strtolower($command)); $this->commands[$command] = array("description" => $description, "class" => $sender); @@ -200,7 +201,7 @@ class PluginHost { function run_commands($args) { foreach ($this->get_commands() as $command => $data) { - if (in_array($command, $args)) { + if (isset($args[$command])) { $command = str_replace("-", "", $command); $data["class"]->$command($args); } |