summaryrefslogtreecommitdiff
path: root/lib/exe/xmlrpc.php
diff options
context:
space:
mode:
authorHakan Sandell <sandell.hakan@gmail.com>2010-11-13 18:20:28 +0100
committerHakan Sandell <sandell.hakan@gmail.com>2010-11-13 18:20:28 +0100
commitba9418bca378a6759305e3b388926df4f5a0af9c (patch)
tree2962f0cb0e391584c1b96695fbd509d6d6eb1b0a /lib/exe/xmlrpc.php
parent14928129ac979d50664cff367377db5364f8e663 (diff)
downloadrpg-ba9418bca378a6759305e3b388926df4f5a0af9c.tar.gz
rpg-ba9418bca378a6759305e3b388926df4f5a0af9c.tar.bz2
Added XMLRPC dokuwiki:appendPage
Diffstat (limited to 'lib/exe/xmlrpc.php')
-rw-r--r--lib/exe/xmlrpc.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php
index f06792361..8c2bec6f9 100644
--- a/lib/exe/xmlrpc.php
+++ b/lib/exe/xmlrpc.php
@@ -7,7 +7,7 @@ if(isset($HTTP_RAW_POST_DATA)) $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
/**
* Increased whenever the API is changed
*/
-define('DOKU_XMLRPC_API_VERSION',4);
+define('DOKU_XMLRPC_API_VERSION',5);
require_once(DOKU_INC.'inc/init.php');
session_write_close(); //close session
@@ -143,6 +143,13 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
true
);
+ $this->addCallback(
+ 'dokuwiki.appendPage',
+ 'this:appendPage',
+ array('int', 'string', 'string', 'struct'),
+ 'Append text to a wiki page.'
+ );
+
/* Wiki API v2 http://www.jspwiki.org/wiki/WikiRPCInterface2 */
$this->addCallback(
'wiki.getRPCVersionSupported',
@@ -578,6 +585,17 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer {
}
/**
+ * Appends text to a wiki page.
+ */
+ function appendPage($id, $text, $params) {
+ $currentpage = $this->rawPage($id);
+ if (!is_string($currentpage)) {
+ return $currentpage;
+ }
+ return $this->putPage($id, $currentpage.$text, $params);
+ }
+
+ /**
* Uploads a file to the wiki.
*
* Michael Klier <chi@chimeric.de>