From e474c0761a3e421a98d3747e0f2706f747199ce3 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sun, 4 Jan 2004 01:58:31 +0000 Subject: [PATCH] Fix CVS duplicate option value problem and removed automatic since it isn't used. git-svn-id: http://svn.automattic.com/wordpress/trunk@711 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/install.php | 1 + wp-admin/upgrade-functions.php | 12 ++++++++++++ wp-admin/upgrade.php | 1 + 3 files changed, 14 insertions(+) diff --git a/wp-admin/install.php b/wp-admin/install.php index da6b7b67d1..53cb7cd182 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -722,6 +722,7 @@ $q = $wpdb->query($query); upgrade_071(); upgrade_072(); upgrade_100(); +upgrade_101(); ?>

User setup successful!

diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 9fc0476623..76f2b4dab4 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -616,4 +616,16 @@ function upgrade_100() { } } +function upgrade_101() { + global $wpdb, $tableoptionvalues; + // Fix possible duplicate problem from CVS + $option59 = $wpdb->get_results("SELECT * FROM $tableoptionvalues WHERE option_id = 59"); + if (1 < count($option59)) { + $wpdb->query("DELETE FROM $tableoptionvalues WHERE option_id = 59 AND optionvalue LIKE('%FROM order%')"); + } + + // Remove 'automatic' option for comment moderation until it actually does something + $wpdb->query("DELETE FROM $tableoptionvalues WHERE optionvalue = 'auto'"); +} + ?> \ No newline at end of file diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php index d6661af432..8fb4833684 100644 --- a/wp-admin/upgrade.php +++ b/wp-admin/upgrade.php @@ -51,6 +51,7 @@ switch($step) { upgrade_071(); upgrade_072(); upgrade_100(); + upgrade_101(); ?>

Step 1

There's actually only one step. So if you see this, you're done. Have fun!