From e6f4c9d492a59d555873548a77c477870f6cdcd8 Mon Sep 17 00:00:00 2001 From: Georges-Etienne Legendre Date: Sat, 17 Apr 2010 21:58:17 +0800 Subject: Adding getTitle to the XML-RPC API --- lib/exe/xmlrpc.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/exe/xmlrpc.php') diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index 743d3eedb..a4dc56f0f 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',3); +define('DOKU_XMLRPC_API_VERSION',4); require_once(DOKU_INC.'inc/init.php'); session_write_close(); //close session @@ -134,6 +134,15 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { 'Lock or unlock pages.' ); + + $this->addCallback( + 'dokuwiki.getTitle', + 'this:getTitle', + array('string'), + 'Returns the wiki title.', + true + ); + /* Wiki API v2 http://www.jspwiki.org/wiki/WikiRPCInterface2 */ $this->addCallback( 'wiki.getRPCVersionSupported', @@ -418,6 +427,13 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { return $pages; } + /** + * Returns the wiki title. + */ + function getTitle(){ + global $conf; + return $conf['title']; + } /** * List all media files. -- cgit v1.2.3