summaryrefslogtreecommitdiff
path: root/lib/exe
diff options
context:
space:
mode:
authorGina Haeussge <osd@foosel.net>2008-08-23 19:31:52 +0200
committerGina Haeussge <osd@foosel.net>2008-08-23 19:31:52 +0200
commitc63d16452935332d3389db45f1ec3f5ab940a0c5 (patch)
tree88d7c1ab419f4acba4c09980678989411b696a76 /lib/exe
parent14e744f4e75aa3607730d3460779f6870d15e567 (diff)
downloadrpg-c63d16452935332d3389db45f1ec3f5ab940a0c5.tar.gz
rpg-c63d16452935332d3389db45f1ec3f5ab940a0c5.tar.bz2
XMLRPC: Cleanup in callback registrations
darcs-hash:20080823173152-2b4f5-8aaed82a8122f0901878326fc17a889c22bc1b79.gz
Diffstat (limited to 'lib/exe')
-rw-r--r--lib/exe/xmlrpc.php37
1 files changed, 20 insertions, 17 deletions
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php
index f02c7e107..491660c97 100644
--- a/lib/exe/xmlrpc.php
+++ b/lib/exe/xmlrpc.php
@@ -79,7 +79,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
$this->addCallback(
'wiki.getAttachments',
'this:listAttachments',
- array('string', 'struct'),
+ array('struct', 'string', 'struct'),
'Returns a list of all media files.'
);
$this->addCallback(
@@ -125,28 +125,28 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
'Returns a strukt about all recent changes since given timestamp.'
);
$this->addCallback(
- 'wiki.aclCheck',
- 'this:aclCheck',
- array('struct', 'string'),
- 'Returns the permissions of a given wiki page.'
+ 'wiki.aclCheck',
+ 'this:aclCheck',
+ array('int', 'string'),
+ 'Returns the permissions of a given wiki page.'
);
$this->addCallback(
- 'wiki.putAttachment',
- 'this:putAttachment',
- array('struct', 'string', 'base64', 'struct'),
- 'Upload a file to the wiki.'
+ 'wiki.putAttachment',
+ 'this:putAttachment',
+ array('struct', 'string', 'base64', 'struct'),
+ 'Upload a file to the wiki.'
);
$this->addCallback(
- 'wiki.getAttachment',
- 'this:getAttachment',
- array('string'),
- 'Download a file from the wiki.'
+ 'wiki.getAttachment',
+ 'this:getAttachment',
+ array('base64', 'string'),
+ 'Download a file from the wiki.'
);
$this->addCallback(
- 'wiki.getAttachmentInfo',
- 'this:getAttachmentInfo',
- array('string'),
- 'Returns a struct with infos about the attachment.'
+ 'wiki.getAttachmentInfo',
+ 'this:getAttachmentInfo',
+ array('struct', 'string'),
+ 'Returns a struct with infos about the attachment.'
);
$this->serve();
@@ -170,8 +170,11 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
/**
* Return a media file encoded in base64
+ *
+ * @author Gina Haeussge <osd@foosel.net>
*/
function getAttachment($id){
+ $id = cleanID($id);
if (auth_quickaclcheck(getNS($id).':*') < AUTH_READ)
return new IXR_Error(1, 'You are not allowed to read this file');