summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Eckelmann <deckelmann@gmail.com>2011-11-28 20:59:49 +0100
committerDominik Eckelmann <deckelmann@gmail.com>2011-11-28 20:59:49 +0100
commit3f3bb97fcdd30282632d96a5bb19d2ea61c01504 (patch)
treee8fd82184f8ef7d89264ea217afae07483c98e82
parentf61380cb67f8216ae4c75922511ff5a07fd21ca0 (diff)
downloadrpg-3f3bb97fcdd30282632d96a5bb19d2ea61c01504.tar.gz
rpg-3f3bb97fcdd30282632d96a5bb19d2ea61c01504.tar.bz2
removed dublicated content
-rw-r--r--inc/remote.php3
-rw-r--r--lib/exe/xmlrpc.php13
2 files changed, 7 insertions, 9 deletions
diff --git a/inc/remote.php b/inc/remote.php
index 6f48d2015..14f6614f1 100644
--- a/inc/remote.php
+++ b/inc/remote.php
@@ -130,4 +130,5 @@ class RemoteAPI {
}
-class RemoteException extends Exception {} \ No newline at end of file
+class RemoteException extends Exception {}
+class RemoteAccessDenied extends RemoteException {} \ No newline at end of file
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php
index e5e3298ae..cb8dbf42d 100644
--- a/lib/exe/xmlrpc.php
+++ b/lib/exe/xmlrpc.php
@@ -21,6 +21,7 @@ if(!$conf['xmlrpc']) die('XML-RPC server not enabled.');
class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
var $methods = array();
var $public_methods = array();
+ var $remote;
/**
* Checks if the current user is allowed to execute non anonymous methods
@@ -67,6 +68,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
* Constructor. Register methods and run Server
*/
function dokuwiki_xmlrpc_server(){
+ $this->remote = new RemoteAPI();
$this->IXR_IntrospectionServer();
/* DokuWiki's own methods */
@@ -284,16 +286,11 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
* Return a raw wiki page
*/
function rawPage($id,$rev=''){
- $id = cleanID($id);
- if(auth_quickaclcheck($id) < AUTH_READ){
+ try {
+ return $this->remote->rawPage($id, $rev);
+ } catch(RemoteAccessDenied $e) {
return new IXR_Error(1, 'You are not allowed to read this page');
}
- $text = rawWiki($id,$rev);
- if(!$text) {
- return pageTemplate($id);
- } else {
- return $text;
- }
}
/**