xml-rpc: delete article from WP iOS fixed
This commit is contained in:
parent
62ceb07887
commit
8993cf8225
3 changed files with 10 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
# $Id$
|
||||
Version 1.46:
|
||||
Version 1.47:
|
||||
* Enhanced the interface with WordPress RPC calls.
|
||||
* Info about RPC caller URL in config, some configurations.
|
||||
* Medialibrary directory for media uploads configurable
|
||||
|
|
|
@ -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.46');
|
||||
$propbag->add('version', '1.47');
|
||||
$propbag->add('requirements', array(
|
||||
'serendipity' => '0.8',
|
||||
'smarty' => '2.6.7',
|
||||
|
|
|
@ -843,12 +843,17 @@ function blogger_deletePost($message) {
|
|||
}
|
||||
|
||||
ob_start();
|
||||
if ($entry['id']) {
|
||||
$id = serendipity_deleteEntry($entry['id']);
|
||||
$result = true;
|
||||
if ($entry['id'] && is_numeric($entry['id'])) {
|
||||
universal_debug("deleting entry: " . $entry['id']);
|
||||
serendipity_deleteEntry($entry['id']);
|
||||
serendipity_plugin_api::hook_event('xmlrpc_deleteEntry', $entry);
|
||||
}
|
||||
else {
|
||||
$result = false;
|
||||
}
|
||||
ob_clean();
|
||||
return new XML_RPC_Response(new XML_RPC_Value(true, 'boolean'));
|
||||
return new XML_RPC_Response(new XML_RPC_Value($result, 'boolean'));
|
||||
}
|
||||
|
||||
function universal_fetchCategories($post_categories) {
|
||||
|
@ -1256,8 +1261,6 @@ function metaWeblog_deletePost($message) {
|
|||
if (!serendipity_authenticate_author($username, $password)) {
|
||||
return new XML_RPC_Response('', XMLRPC_ERR_CODE_AUTHFAILED, XMLRPC_ERR_NAME_AUTHFAILED);
|
||||
}
|
||||
$val = $message->params[4];
|
||||
$entry['body'] = $val->getval();
|
||||
$entry['author'] = $username;
|
||||
ob_start();
|
||||
$id = serendipity_deleteEntry($entry['id']);
|
||||
|
|
Loading…
Reference in a new issue