diff options
author | Georges-Etienne Legendre <legege@bonsai.home.legege.com> | 2010-04-17 21:58:17 +0800 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2010-04-18 19:21:02 +0800 |
commit | e6f4c9d492a59d555873548a77c477870f6cdcd8 (patch) | |
tree | ac271265c25ce4a0143888dd62d3ea523967169a /lib/exe | |
parent | ac1ffdde2b4e44e5eb2434a5df8ef6a04bb4ff29 (diff) | |
download | rpg-e6f4c9d492a59d555873548a77c477870f6cdcd8.tar.gz rpg-e6f4c9d492a59d555873548a77c477870f6cdcd8.tar.bz2 |
Adding getTitle to the XML-RPC API
Diffstat (limited to 'lib/exe')
-rw-r--r-- | lib/exe/xmlrpc.php | 18 |
1 files changed, 17 insertions, 1 deletions
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. |