summaryrefslogtreecommitdiff
path: root/inc/remote.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/remote.php')
-rw-r--r--inc/remote.php7
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];
}
/**