From 877f81d625fb41937f3f0e1fa4f27788d362ce82 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Mon, 27 Sep 2004 13:52:46 +0000 Subject: [PATCH] convert trackbacks and pingbacks to use comment_type git-svn-id: http://svn.automattic.com/wordpress/trunk@1719 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/upgrade-functions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index e37f7e7ed..aec4d4e27 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -191,6 +191,11 @@ function upgrade_130() { $wpdb->query('DROP TABLE IF EXISTS ' . $table_prefix . 'optiontypes'); $wpdb->query('DROP TABLE IF EXISTS ' . $table_prefix . 'optiongroups'); $wpdb->query('DROP TABLE IF EXISTS ' . $table_prefix . 'optiongroup_options'); + + // Update comments table to use comment_type + $wpdb->query("UPDATE $wpdb->comments SET comment_type='trackback', comment_content = REPLACE(comment_content, '', '') WHERE comment_content LIKE '%'"); + $wpdb->query("UPDATE $wpdb->comments SET comment_type='trackback', comment_content = REPLACE(comment_content, '', '') WHERE comment_content LIKE '%'"); + } // The functions we use to actually do stuff