aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/Remote/Api.php
diff options
context:
space:
mode:
authorSatoshi Sahara <sahara.satoshi@gmail.com>2021-05-09 13:26:07 +0900
committerGitHub <noreply@github.com>2021-05-09 13:26:07 +0900
commit700ab9fdf1102a367a591bba2bc4a470ca345d2f (patch)
tree1e118d31fcf905132d7b3dc8aba2e21b4d1c0e5f /inc/Remote/Api.php
parent871895a75d164d6a6389dbba8ae132577a744de4 (diff)
parent55c2f8c9858c38a70d317809fbfbee6439c10291 (diff)
downloaddokuwiki-700ab9fdf1102a367a591bba2bc4a470ca345d2f.tar.gz
dokuwiki-700ab9fdf1102a367a591bba2bc4a470ca345d2f.zip
Merge branch 'master' into revisionHandle3
Diffstat (limited to 'inc/Remote/Api.php')
-rw-r--r--inc/Remote/Api.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/Remote/Api.php b/inc/Remote/Api.php
index 3b526564d..749c2e6ea 100644
--- a/inc/Remote/Api.php
+++ b/inc/Remote/Api.php
@@ -92,7 +92,8 @@ class Api
if ($args === null) {
$args = array();
}
- list($type, $pluginName, /* $call */) = explode('.', $method, 3);
+ // Ensure we have at least one '.' in $method
+ list($type, $pluginName, /* $call */) = explode('.', $method . '.', 3);
if ($type === 'plugin') {
return $this->callPlugin($pluginName, $method, $args);
}
@@ -128,8 +129,9 @@ class Api
if (!array_key_exists($method, $customCalls)) {
throw new RemoteException('Method does not exist', -32603);
}
- $customCall = $customCalls[$method];
- return $this->callPlugin($customCall[0], $customCall[1], $args);
+ list($plugin, $method) = $customCalls[$method];
+ $fullMethod = "plugin.$plugin.$method";
+ return $this->callPlugin($plugin, $fullMethod, $args);
}
/**