summaryrefslogtreecommitdiff
path: root/inc/remote.php
diff options
context:
space:
mode:
authorDominik Eckelmann <deckelmann@gmail.com>2012-03-14 12:52:36 +0100
committerDominik Eckelmann <deckelmann@gmail.com>2012-03-14 12:52:36 +0100
commit3a6d76070be7220b8e5f7c04443aa923bc8cddf2 (patch)
treedfd00b5d0c5f58ee313eb376a8cb1ee99512bf83 /inc/remote.php
parent03d7247e047c21d2733f837148a1499f56784ae3 (diff)
parentd0caa5642f6e322a026bd5bdac4585ff1b2f40da (diff)
downloadrpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.gz
rpg-3a6d76070be7220b8e5f7c04443aa923bc8cddf2.tar.bz2
Merge branch 'master' of https://github.com/splitbrain/dokuwiki
Conflicts: lib/exe/xmlrpc.php
Diffstat (limited to 'inc/remote.php')
-rw-r--r--inc/remote.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/inc/remote.php b/inc/remote.php
index 105969f8b..c8af76420 100644
--- a/inc/remote.php
+++ b/inc/remote.php
@@ -92,7 +92,7 @@ class RemoteAPI {
$plugin = plugin_load('remote', $pluginName);
$methods = $this->getPluginMethods();
if (!$plugin) {
- throw new RemoteException('Method dose not exists');
+ throw new RemoteException('Method dose not exists', -32603);
}
$this->checkAccess($methods[$method]);
$name = $this->getMethodName($methods, $method);
@@ -103,7 +103,7 @@ class RemoteAPI {
$coreMethods = $this->getCoreMethods();
$this->checkAccess($coreMethods[$method]);
if (!isset($coreMethods[$method])) {
- throw new RemoteException('Method dose not exists');
+ throw new RemoteException('Method dose not exists', -32603);
}
$this->checkArgumentLength($coreMethods[$method], $args);
return call_user_func_array(array($this->coreMethods, $this->getMethodName($coreMethods, $method)), $args);
@@ -121,7 +121,7 @@ class RemoteAPI {
private function checkArgumentLength($method, $args) {
if (count($method['args']) < count($args)) {
- throw new RemoteException('Method dose not exists - wrong parameter count.');
+ throw new RemoteException('Method dose not exists - wrong parameter count.', -32603);
}
}
@@ -158,7 +158,7 @@ class RemoteAPI {
*/
public function forceAccess() {
if (!$this->hasAccess()) {
- throw new RemoteAccessDeniedException();
+ throw new RemoteAccessDeniedException('server error. not authorized to call method', -32603);
}
}
@@ -220,4 +220,4 @@ class RemoteAPI {
public function setFileTransformation($fileTransformation) {
$this->fileTransformation = $fileTransformation;
}
-} \ No newline at end of file
+}