Fix quotes, props Denis-de-Bernardy, see #2699
git-svn-id: http://svn.automattic.com/wordpress/trunk@11884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4064e1cb6c
commit
38d5ac6152
|
@ -1672,7 +1672,7 @@ function pre_schema_upgrade() {
|
|||
// Delete duplicate options. Keep the option with the highest option_id.
|
||||
$delete_options = $wpdb->get_col("SELECT o1.option_id FROM $wpdb->options AS o1 JOIN $wpdb->options AS o2 ON o2.option_name = o1.option_name AND o2.option_id > o1.option_id");
|
||||
if ( !empty($delete_options) ) {
|
||||
$delete_options = implode("', '", $delete_options);
|
||||
$delete_options = implode(',', $delete_options);
|
||||
$wpdb->query("DELETE FROM $wpdb->options WHERE option_id IN ($delete_options)");
|
||||
}
|
||||
|
||||
|
@ -1686,4 +1686,4 @@ function pre_schema_upgrade() {
|
|||
$wpdb->query("ALTER TABLE $wpdb->options DROP INDEX option_name");
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue