diff options
author | Dominik Eckelmann <deckelmann@gmail.com> | 2011-12-08 20:33:30 +0100 |
---|---|---|
committer | Dominik Eckelmann <deckelmann@gmail.com> | 2011-12-08 20:33:30 +0100 |
commit | 647919c9a61d928502b0b45063cc60702d0d310e (patch) | |
tree | b9fcc26511311af1f1f6aa229f0be6d2eeb7d65d /inc/remote.php | |
parent | 4815d222f25c9a31949297223c98cfca7151ae8d (diff) | |
download | rpg-647919c9a61d928502b0b45063cc60702d0d310e.tar.gz rpg-647919c9a61d928502b0b45063cc60702d0d310e.tar.bz2 |
added remote plugin calls.
Diffstat (limited to 'inc/remote.php')
-rw-r--r-- | inc/remote.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/remote.php b/inc/remote.php index 5f136a43d..bc35d525e 100644 --- a/inc/remote.php +++ b/inc/remote.php @@ -75,10 +75,12 @@ class RemoteAPI { list($type, $pluginName, $call) = explode('.', $method, 3); if ($type === 'plugin') { $plugin = plugin_load('remote', $pluginName); + $methods = $this->getPluginMethods(); if (!$plugin) { throw new RemoteException('Method dose not exists'); } - return call_user_func_array(array($plugin, $call), $args); + $name = $this->getMethodName($methods, $method); + return call_user_func_array(array($plugin, $name), $args); } else { $coreMethods = $this->getCoreMethods(); if (!isset($coreMethods[$method])) { @@ -99,7 +101,8 @@ class RemoteAPI { if (isset($methodMeta[$method]['name'])) { return $methodMeta[$method]['name']; } - return $method; + $method = explode('.', $method); + return $method[count($method)-1]; } /** |