Ticket #1452: xmlrpc.php.patch
File xmlrpc.php.patch, 1.6 KB (added by , 19 years ago) |
---|
-
xmlrpc.php
old new 24 24 fclose($fp); 25 25 } 26 26 return true; 27 27 } 28 28 29 29 function starify($string) { 30 30 $i = strlen($string); … … 543 543 logIO('O', "Posted ! ID: $post_ID"); 544 544 545 545 // FIXME: do we pingback always? pingback($content, $post_ID); 546 trackback_url_list($content_struct['mt_tb_ping_urls'],$post_ID); 546 $tb_list = $content_struct['mt_tb_ping_urls']; 547 if (is_array($tb_list)) { 548 $tb_list = implode(",", $tb_list); 549 } 550 551 trackback_url_list($tb_list, $post_ID); 547 552 548 553 return strval($post_ID); 549 554 } … … 614 619 // We've got all the data -- post it: 615 620 $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt'); 616 621 617 $ post_ID= wp_update_post($newpost);618 if (!$ post_ID) {622 $aff_rows = wp_update_post($newpost); 623 if (!$aff_rows) { 619 624 return new IXR_Error(500, 'Sorry, your entry could not be edited. Something wrong happened.'); 620 625 } 621 626 622 627 logIO('O',"(MW) Edited ! ID: $post_ID"); 623 628 624 629 // FIXME: do we pingback always? pingback($content, $post_ID); 625 trackback_url_list($content_struct['mt_tb_ping_urls'], $post_ID); 630 $tb_list = $content_struct['mt_tb_ping_urls']; 631 if (is_array($tb_list)) { 632 $tb_list = implode(",", $tb_list); 633 } 634 635 trackback_url_list($tb_list, $post_ID); 626 636 627 637 return true; 628 638 } … … 1270 1280 1271 1281 $wp_xmlrpc_server = new wp_xmlrpc_server(); 1272 1282 1273 ?> 1274 No newline at end of file 1283 ?>