diff options
author | Satoshi Sahara <sahara.satoshi@gmail.com> | 2021-05-09 13:26:07 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-09 13:26:07 +0900 |
commit | 700ab9fdf1102a367a591bba2bc4a470ca345d2f (patch) | |
tree | 1e118d31fcf905132d7b3dc8aba2e21b4d1c0e5f /inc/Remote | |
parent | 871895a75d164d6a6389dbba8ae132577a744de4 (diff) | |
parent | 55c2f8c9858c38a70d317809fbfbee6439c10291 (diff) | |
download | dokuwiki-700ab9fdf1102a367a591bba2bc4a470ca345d2f.tar.gz dokuwiki-700ab9fdf1102a367a591bba2bc4a470ca345d2f.zip |
Merge branch 'master' into revisionHandle3
Diffstat (limited to 'inc/Remote')
-rw-r--r-- | inc/Remote/Api.php | 8 |
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); } /** |