From 4815d222f25c9a31949297223c98cfca7151ae8d Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Thu, 8 Dec 2011 19:57:18 +0100 Subject: RemoteAPI can now handle remote calls. --- inc/RemoteAPICore.php | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'inc/RemoteAPICore.php') diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php index c4324ba29..a2e12c7f1 100644 --- a/inc/RemoteAPICore.php +++ b/inc/RemoteAPICore.php @@ -2,6 +2,47 @@ class RemoteAPICore { + function __getRemoteInfo() { + return array( + 'wiki.getPage' => array( + 'args' => array( + 'id' => array( + 'type' => 'string', + 'doc' => 'wiki page id' + ), + ), + 'return' => 'string', + 'doc' => 'Return a raw wiki page', + 'name' => 'rawPage', + ), + 'wiki.getPageVersion' => array( + 'args' => array( + 'id' => array( + 'type' => 'string', + 'doc' => 'wiki page id' + ), + 'rev' => array( + 'type' => 'int', + 'doc' => 'revision number of the page', + ), + ), + 'name' => 'rawPage', + 'return' => 'string', + 'doc' => 'Return a raw wiki page' + ), + 'wiki.getAttachment' => array( + 'args' => array( + 'type' => 'string', + 'doc' => 'file id', + ), + 'doc' => 'Return a media file', + 'return' => 'file', + 'name' => 'getAttachment', + ), + + ); + } + /** * Return a raw wiki page * @param string $id wiki page id @@ -58,7 +99,7 @@ class RemoteAPICore { $file = mediaFN($id); if ((auth_quickaclcheck(getNS($id).':*') >= AUTH_READ) && file_exists($file)){ - $info['lastModified'] = new IXR_Date(filemtime($file)); + $info['lastModified'] = filemtime($file); $info['size'] = filesize($file); } -- cgit v1.2.3