From 767c3538b9f4aa2684429a7efea8f7728034c754 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 5 Oct 2006 17:45:26 +0000 Subject: WP Merge to rev 4347 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@789 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- xmlrpc.php | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) (limited to 'xmlrpc.php') diff --git a/xmlrpc.php b/xmlrpc.php index d878cd4..c937122 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -58,31 +58,8 @@ function starify($string) { return str_repeat('*', $i); } -logIO("I", $HTTP_RAW_POST_DATA); - - -function mkdir_p($target) { - // from php.net/mkdir user contributed notes - if (file_exists($target)) { - if (!is_dir($target)) { - return false; - } else { - return true; - } - } - - // Attempting to create the directory may clutter up our display. - if (@mkdir($target)) { - return true; - } - - // If the above failed, attempt to create the parent node, then try again. - if (mkdir_p(dirname($target))) { - return mkdir_p($target); - } - - return false; -} +if ( isset($HTTP_RAW_POST_DATA) ) + logIO("I", $HTTP_RAW_POST_DATA); class wp_xmlrpc_server extends IXR_Server { @@ -1238,8 +1215,8 @@ class wp_xmlrpc_server extends IXR_Server { $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_content', 'comment_type'); - $comment_ID = wp_new_comment($commentdata); - do_action('pingback_post', $comment_ID); + wp_new_comment($commentdata); + do_action('pingback_post', $wpdb->insert_id); return "Pingback from $pagelinkedfrom to $pagelinkedto registered. Keep the web talking! :-)"; } -- cgit