diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index 4f0cda7b0..abb1ec4b6 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -110,6 +110,7 @@ include('options-head.php'); +

diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php index 84b4d0d63..a8282bff1 100644 --- a/wp-admin/options-writing.php +++ b/wp-admin/options-writing.php @@ -48,7 +48,7 @@ include('options-head.php');

Writing Options

- + diff --git a/wp-admin/options.php b/wp-admin/options.php index e86b832d6..bb6f45cc4 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -35,7 +35,7 @@ for ($i=0; $ioption_name, $nonbools) && $new_val == 0 ) $new_value = 'closed'; if ($new_val !== $old_val) { - $query = "UPDATE $tableoptions SET option_value = '$new_val' WHERE option_id = $option->option_id"; + $query = "UPDATE $tableoptions SET option_value = '$new_val' WHERE option_name = '$option->option_name'"; $result = $wpdb->query($query); //if( in_array($option->option_name, $nonbools)) die('boo'.$query); if (!$result) { @@ -109,7 +109,8 @@ $nonbools = array('default_ping_status', 'default_comment_status'); $message .= $dB_errors . '
' . $validation_message; } - $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true'; + if (strstr($_SERVER['HTTP_REFERER'], '?')) $goback = str_replace('&updated=true', '', $_SERVER['HTTP_REFERER']) . '&updated=true'; + else $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true'; header('Location: ' . $goback); break; diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 1c28e4ba7..3e5114deb 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -731,7 +731,7 @@ function upgrade_110() { // Add a gmt_offset option, with value $gmt_offset if (!get_settings('gmt_offset')) { if(!$wpdb->get_var("SELECT * FROM $tableoptions WHERE option_name = 'gmt_offset'")) { - $wpdb->query("INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level) VALUES (94, 'gmt_offset', 8, $gmt_offset, 'The difference in hours between GMT and your timezone', 8)"); + $wpdb->query("INSERT INTO $tableoptions (option_name, option_type, option_value, option_description, option_admin_level) VALUES ('gmt_offset', 8, $gmt_offset, 'The difference in hours between GMT and your timezone', 8)"); } } diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 04d3d49ad..fc5ac6297 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -50,7 +50,6 @@ function mysql2date($dateformatstring, $mysqlstring, $use_b2configmonthsdays = 1 } function current_time($type, $gmt = 0) { - $time_difference = get_settings('time_difference'); switch ($type) { case 'mysql': if ($gmt) $d = gmdate('Y-m-d H:i:s'); @@ -300,9 +299,6 @@ function get_settings($setting) { return false; } - // until we switch to using 'gmt_offset' everywhere - $setting = str_replace('time_difference', 'gmt_offset', $setting); - if ( (empty($cache_settings)) ) { $settings = get_alloptions(); $cache_settings = $settings;