summaryrefslogtreecommitdiff
path: root/classes/pluginhost.php
diff options
context:
space:
mode:
authorRichard Beales <[email protected]>2013-03-21 18:57:21 +0000
committerRichard Beales <[email protected]>2013-03-21 18:57:21 +0000
commit96f19f11d741617b997b4533df50ff8a5b17f46b (patch)
tree7ae4cc7c4b7192336d86bf4df0dee544f339f168 /classes/pluginhost.php
parentf1fdfbea433c834ae7f09b4ef23f23d5efa069d4 (diff)
parent3a693fa76f0cc6a38aa5642a08b48f58c29758bc (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'classes/pluginhost.php')
-rw-r--r--classes/pluginhost.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php
index 79544b01b..7dabd42a8 100644
--- a/classes/pluginhost.php
+++ b/classes/pluginhost.php
@@ -22,6 +22,7 @@ class PluginHost {
const HOOK_RENDER_ARTICLE_CDM = 11;
const HOOK_FEED_FETCHED = 12;
const HOOK_SANITIZE = 13;
+ const HOOK_RENDER_ARTICLE_API = 14;
const KIND_ALL = 1;
const KIND_SYSTEM = 2;
@@ -171,7 +172,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);
@@ -201,7 +202,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);
}