From 3f3bb97fcdd30282632d96a5bb19d2ea61c01504 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Mon, 28 Nov 2011 20:59:49 +0100 Subject: removed dublicated content --- lib/exe/xmlrpc.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'lib/exe/xmlrpc.php') 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; - } } /** -- cgit v1.2.3