Skip to content

Commit

Permalink
Adding getTitle to the XML-RPC API
Browse files Browse the repository at this point in the history
  • Loading branch information
Georges-Etienne Legendre authored and splitbrain committed Apr 18, 2010
1 parent ac1ffdd commit e6f4c9d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lib/exe/xmlrpc.php
Expand Up @@ -7,7 +7,7 @@
/**
* 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
Expand Down Expand Up @@ -134,6 +134,15 @@ function dokuwiki_xmlrpc_server(){
'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',
Expand Down Expand Up @@ -418,6 +427,13 @@ function search($query){
return $pages;
}

/**
* Returns the wiki title.
*/
function getTitle(){
global $conf;
return $conf['title'];
}

/**
* List all media files.
Expand Down

0 comments on commit e6f4c9d

Please sign in to comment.