mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Fix quotes, props Denis-de-Bernardy, see #2699
git-svn-id: https://develop.svn.wordpress.org/trunk@11884 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user