* Fixed wp.getCategories crashing the WP iOS client
* Added configuration info about the XML-RPC URL of the blog.
This commit is contained in:
Grischa Brockhaus 2012-01-04 16:58:49 +01:00
parent bdb01291fe
commit 708db48ee9
6 changed files with 19 additions and 2 deletions

View file

@ -1,4 +1,8 @@
# $Id$
Version 1.46:
* Enahnced the interface with WordPress RPC calls.
* Info about RPC caller URL in config.
Version 1.45:
* Catch empty timestemps, thanks to TimNiceBut

View file

@ -6,4 +6,4 @@
@define('PLUGIN_EVENT_XMLRPC_DEFAULTCAT_DESC', 'Bestimmt die Standard-Kategorie für Blog-Artikel via XML-RPC, wenn der Client keine Kategorie setzt.');
@define('PLUGIN_EVENT_XMLRPC_GMT', 'GMT Zeitzone verwenden');
@define('PLUGIN_EVENT_XMLRPC_DOC_RPCLINK','<b>Zur Information:</b><br/>Dieses Blog hat eine URL, an der XML-RPC Aufrufe abgearbeitet werden. Modernere Clients können diese automatisch mit der Blog URL ermitteln, bei älteren Clients muss sie explizit angegeben werden.<br/>Deine XML-RPC URL ist: <b>%s</b><br/>');

View file

@ -5,3 +5,5 @@
@define('PLUGIN_EVENT_XMLRPC_DEFAULTCAT', 'Standard-Kategorie');
@define('PLUGIN_EVENT_XMLRPC_DEFAULTCAT_DESC', 'Bestimmt die Standard-Kategorie für Blog-Artikel via XML-RPC, wenn der Client keine Kategorie setzt.');
@define('PLUGIN_EVENT_XMLRPC_GMT', 'GMT Zeitzone verwenden');
@define('PLUGIN_EVENT_XMLRPC_DOC_RPCLINK','<b>Zur Information:</b><br/>Dieses Blog hat eine URL, an der XML-RPC Aufrufe abgearbeitet werden. Modernere Clients können diese automatisch mit der Blog URL ermitteln, bei älteren Clients muss sie explizit angegeben werden.<br/>Deine XML-RPC URL ist: <b>%s</b><br/>');

View file

@ -11,3 +11,5 @@
@define('PLUGIN_EVENT_XMLRPC_GMT', 'Use GMT time format');
@define('PLUGIN_EVENT_XMLRPC_DEFAULTCAT', 'Default category');
@define('PLUGIN_EVENT_XMLRPC_DEFAULTCAT_DESC', 'Specify the default category, when your blogging client specifies none.');
@define('PLUGIN_EVENT_XMLRPC_DOC_RPCLINK','<b>For your information:</b><br/>This blog has an URL where XMLRPC calls are handled. More modern clients are able to detect this RPC URL automatically from your blog URL, but for some older clients you have to tell them the RPC URL explicitly.<br/>Your XML-RPC URL is: <b>%s</b><br/>');

View file

@ -35,7 +35,7 @@ class serendipity_event_xmlrpc extends serendipity_event
'frontend_xmlrpc' => true,
'frontend_header' => true
));
$propbag->add('configuration', array('category', 'gmt'));
$propbag->add('configuration', array('doc_rpclink','category', 'gmt'));
$propbag->add('groups', array('FRONTEND_FULL_MODS', 'FRONTEND_EXTERNAL_SERVICES'));
}
@ -65,7 +65,13 @@ class serendipity_event_xmlrpc extends serendipity_event
function introspect_config_item($name, &$propbag)
{
global $serendipity;
switch($name) {
case 'doc_rpclink':
$propbag->add('type', 'content');
$propbag->add('default', sprintf(PLUGIN_EVENT_XMLRPC_DOC_RPCLINK, $serendipity['baseURL'] . 'serendipity_xmlrpc.php'));
break;
case 'gmt':
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_EVENT_XMLRPC_GMT);

View file

@ -161,6 +161,9 @@ function wp_getCategories($message) {
if (!empty($cat['parentid'])) {
$values['parentId'] = new XML_RPC_Value($cat['parentid'], 'int');
}
else {
$values['parentId'] = new XML_RPC_Value(0, 'int');
}
$xml_entries_vals[] = new XML_RPC_Value($values,'struct');
}
}