diff --git a/wp-admin/import-mt.php b/wp-admin/import-mt.php index b08405b1e..e72867d4e 100644 --- a/wp-admin/import-mt.php +++ b/wp-admin/import-mt.php @@ -382,13 +382,13 @@ foreach ($posts as $post) { if ('' != trim($post)) { $comment_content = addslashes(trim($ping)); $comment_content = str_replace('-----', '', $comment_content); - $comment_content = "$ping_title\n$comment_content"; + $comment_content = "$ping_title\n\n$comment_content"; // Check if it's already there if (!$wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_date = '$comment_date' AND comment_content = '$comment_content'")) { - $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved) + $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved, comment_type) VALUES - ($post_id, '$comment_author', '$comment_email', '$comment_url', '$comment_ip', '$comment_date', '$comment_content', '1')"); + ($post_id, '$comment_author', '$comment_email', '$comment_url', '$comment_ip', '$comment_date', '$comment_content', '1', 'trackback')"); echo " Comment added."; } diff --git a/wp-content/plugins/hello.php b/wp-content/plugins/hello.php index bf86344f7..3eee83f94 100644 --- a/wp-content/plugins/hello.php +++ b/wp-content/plugins/hello.php @@ -2,8 +2,9 @@ /* Plugin Name: Hello Dolly Plugin URI: http://wordpress.org/# -Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. When enabled you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page but the plugins page. +Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. Hello, Dolly. This is, by the way, the world's first official WordPress plugin. When enabled you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page. Author: Matt Mullenweg +Version: 1.0 Author URI: http://photomatt.net/ */ diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index 9ef7f5dc4..4df4329bb 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -237,9 +237,7 @@ function comment_author_IP() { function get_comment_text() { global $comment; - $comment_text = str_replace('', '', $comment->comment_content); - $comment_text = str_replace('', '', $comment_text); - return apply_filters('get_comment_text', $comment_text); + return apply_filters('get_comment_text', $comment->comment_content); } function comment_text() { @@ -254,9 +252,7 @@ function comment_text_rss() { function get_comment_excerpt() { global $comment; - $comment_text = str_replace('', '', $comment->comment_content); - $comment_text = str_replace('', '', $comment_text); - $comment_text = strip_tags($comment_text); + $comment_text = strip_tags($comment->comment_content); $blah = explode(' ', $comment_text); if (count($blah) > 20) { $k = 20; @@ -396,8 +392,8 @@ function get_lastcommentmodified($timezone = 'server') { return $lastcommentmodified; } -function get_commentdata($comment_ID,$no_cache=0,$include_unapproved=false) { // less flexible, but saves DB queries - global $postc,$id,$commentdata, $wpdb; +function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) { // less flexible, but saves DB queries + global $postc, $id, $commentdata, $wpdb; if ($no_cache) { $query = "SELECT * FROM $wpdb->comments WHERE comment_ID = '$comment_ID'"; if (false == $include_unapproved) { @@ -405,23 +401,17 @@ function get_commentdata($comment_ID,$no_cache=0,$include_unapproved=false) { // } $myrow = $wpdb->get_row($query, ARRAY_A); } else { - $myrow['comment_ID']=$postc->comment_ID; - $myrow['comment_post_ID']=$postc->comment_post_ID; - $myrow['comment_author']=$postc->comment_author; - $myrow['comment_author_email']=$postc->comment_author_email; - $myrow['comment_author_url']=$postc->comment_author_url; - $myrow['comment_author_IP']=$postc->comment_author_IP; - $myrow['comment_date']=$postc->comment_date; - $myrow['comment_content']=$postc->comment_content; - $myrow['comment_karma']=$postc->comment_karma; - $myrow['comment_approved']=$postc->comment_approved; - if (strstr($myrow['comment_content'], '')) { - $myrow['comment_type'] = 'trackback'; - } elseif (strstr($myrow['comment_content'], '')) { - $myrow['comment_type'] = 'pingback'; - } else { - $myrow['comment_type'] = 'comment'; - } + $myrow['comment_ID'] = $postc->comment_ID; + $myrow['comment_post_ID'] = $postc->comment_post_ID; + $myrow['comment_author'] = $postc->comment_author; + $myrow['comment_author_email'] = $postc->comment_author_email; + $myrow['comment_author_url'] = $postc->comment_author_url; + $myrow['comment_author_IP'] = $postc->comment_author_IP; + $myrow['comment_date'] = $postc->comment_date; + $myrow['comment_content'] = $postc->comment_content; + $myrow['comment_karma'] = $postc->comment_karma; + $myrow['comment_approved'] = $postc->comment_approved; + $myrow['comment_type'] = $postc->comment_type; } return $myrow; } diff --git a/xmlrpc.php b/xmlrpc.php index 8cb3febab..67ca98a7b 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -1020,12 +1020,8 @@ class wp_xmlrpc_server extends IXR_Server { $trackback_pings = array(); foreach($comments as $comment) { - if ((strpos($comment->comment_content, '') === 0) - || ('trackback' == $comment->comment_type)) { - // FIXME: would be nicer to have a comment_title field? - // FIXME: assumption: here we make the assumption that trackback - // titles are stored as title - $content = str_replace('', '', $comment->comment_content); + if ( 'trackback' == $comment->comment_type ) { + $content = $comment->comment_content; $title = substr($content, 8, (strpos($content, '') - 8)); $trackback_pings[] = array( 'pingTitle' => $title, @@ -1269,10 +1265,8 @@ class wp_xmlrpc_server extends IXR_Server { $pingbacks = array(); foreach($comments as $comment) { - if ((strpos($comment->comment_content, '') === 0) - || ('pingback' == $comment->comment_type)) { + if ( 'pingback' == $comment->comment_type ) $pingbacks[] = $comment->comment_author_url; - } } return $pingbacks;