Skip to content

Commit

Permalink
removed dublicated content
Browse files Browse the repository at this point in the history
  • Loading branch information
dom-mel committed Nov 28, 2011
1 parent f61380c commit 3f3bb97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
3 changes: 2 additions & 1 deletion inc/remote.php
Expand Up @@ -130,4 +130,5 @@ public function getCoreMethods() {
}


class RemoteException extends Exception {}
class RemoteException extends Exception {}
class RemoteAccessDenied extends RemoteException {}
13 changes: 5 additions & 8 deletions lib/exe/xmlrpc.php
Expand Up @@ -21,6 +21,7 @@
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
Expand Down Expand Up @@ -67,6 +68,7 @@ function call($methodname, $args){
* Constructor. Register methods and run Server
*/
function dokuwiki_xmlrpc_server(){
$this->remote = new RemoteAPI();
$this->IXR_IntrospectionServer();

/* DokuWiki's own methods */
Expand Down Expand Up @@ -284,16 +286,11 @@ function dokuwiki_xmlrpc_server(){
* 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;
}
}

/**
Expand Down

0 comments on commit 3f3bb97

Please sign in to comment.