Skip to content
Snippets Groups Projects
Commit 5f9bea26 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #10115 by James: bugfixes:

   + If an array of tb urls is given for mt_tb_ping_urls, the last url actually gets pinged twice.
   + mt_allow_comments and mt_convert_breaks were not being sent properly in the xmlrpc response for getPost.
parent 451821ab
No related branches found
No related tags found
No related merge requests found
......@@ -603,6 +603,7 @@ function _blogapi_mt_extra(&$node, $struct) {
foreach ($struct['mt_tb_ping_urls'] as $tb_ping_url) {
$node->tb_url = $tb_ping_url->getVal();
trackback_send($node);
unset($node->tb_url); // make sure we don't ping twice
}
}
else {
......@@ -645,8 +646,8 @@ function _blogapi_get_post($node, $bodies = true) {
$xmlrpcval['content'] = new xmlrpcval("<title>$blog->title</title>$node->body", 'string');
$xmlrpcval['description'] = new xmlrpcval($node->body, 'string');
// Add MT specific fields
$xmlrpcval['mt_allow_comments'] = $comment;
$xmlrpcval['mt_convert_breaks'] = $node->format;
$xmlrpcval['mt_allow_comments'] = new xmlrpcval($comment, 'string');
$xmlrpcval['mt_convert_breaks'] = new xmlrpcval($node->format, 'string');
}
return new xmlrpcval($xmlrpcval, 'struct');
......
......@@ -603,6 +603,7 @@ function _blogapi_mt_extra(&$node, $struct) {
foreach ($struct['mt_tb_ping_urls'] as $tb_ping_url) {
$node->tb_url = $tb_ping_url->getVal();
trackback_send($node);
unset($node->tb_url); // make sure we don't ping twice
}
}
else {
......@@ -645,8 +646,8 @@ function _blogapi_get_post($node, $bodies = true) {
$xmlrpcval['content'] = new xmlrpcval("<title>$blog->title</title>$node->body", 'string');
$xmlrpcval['description'] = new xmlrpcval($node->body, 'string');
// Add MT specific fields
$xmlrpcval['mt_allow_comments'] = $comment;
$xmlrpcval['mt_convert_breaks'] = $node->format;
$xmlrpcval['mt_allow_comments'] = new xmlrpcval($comment, 'string');
$xmlrpcval['mt_convert_breaks'] = new xmlrpcval($node->format, 'string');
}
return new xmlrpcval($xmlrpcval, 'struct');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment