xmlrpc: ifttt fix. Some clients send tags as arrays instead of csv's.

Now we accept that, too.
This commit is contained in:
Grischa Brockhaus 2012-03-06 20:55:27 +01:00
parent 935df99eea
commit 2633b26ce5
3 changed files with 8 additions and 1 deletions

View file

@ -1,4 +1,7 @@
# $Id$
Version 1.50:
* ifttt fix: Some clients send tags as arrays instead of csv's. Now we accept that, too.
Version 1.49:
* Fixed update comment. Tested as working on iPhone client.

View file

@ -25,7 +25,7 @@ class serendipity_event_xmlrpc extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_XMLRPC_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
$propbag->add('version', '1.49');
$propbag->add('version', '1.50');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',

View file

@ -1072,6 +1072,10 @@ function metaWeblog_newPost($message) {
// Set tags as if it was set from editor. The plugins reads them from POST
if (!empty($post_array['mt_keywords'])) {
// Some clients send keywords as arrays and not as csv's. We fix this here.
if (is_array($post_array['mt_keywords'])) {
$post_array['mt_keywords'] = implode(',', $post_array['mt_keywords']);
}
if (empty($serendipity['POST'])) $serendipity['POST'] = array();
$serendipity['POST']['properties']['freetag_tagList'] = $post_array['mt_keywords'];
$serendipity['POST']['properties']['microblogging_tagList'] = $post_array['mt_keywords'];