WordPress.org

Make WordPress Core

Changeset 1206


Ignore:
Timestamp:
04/28/2004 08:31:41 PM (14 years ago)
Author:
saxmatt
Message:

Gremlins in the options machine.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-general.php

    r1203 r1206  
    111111        </tr>
    112112</table>
     113<pre><?php var_dump($cache_settings); ?></pre>
    113114    </fieldset>
    114115    <p style="text-align: right;">
  • trunk/wp-admin/options-writing.php

    r1113 r1206  
    4949  <form name="form1" method="post" action="options.php">
    5050    <input type="hidden" name="action" value="update" />
    51     <input type="hidden" name="page_options" value="'default_post_edit_rows','blog_charset','use_smilies','use_balanceTags','advanced_edit','ping_sites','mailserver_url', 'mailserver_port','mailserver_login','mailserver_pass','default_category'" />
     51    <input type="hidden" name="page_options" value="'default_post_edit_rows','use_smilies','use_balanceTags','advanced_edit','ping_sites','mailserver_url', 'mailserver_port','mailserver_login','mailserver_pass','default_category'" />
    5252    <table width="100%" cellspacing="2" cellpadding="5" class="editform">
    5353      <tr valign="top">
  • trunk/wp-admin/options.php

    r1198 r1206  
    3636    }
    3737}
    38 $option_group_id = (int) $_GET['option_group_id'];
     38if (isset($_GET['option_group_id'])) $option_group_id = (int) $_GET['option_group_id'];
    3939require_once('./optionhandler.php');
    4040$non_was_selected = 0;
     
    8484                if( in_array($option->option_name, $nonbools) && $new_val == 0 ) $new_value = 'closed';
    8585                if ($new_val !== $old_val) {
    86                     $query = "UPDATE $tableoptions SET option_value = '$new_val' WHERE option_id = $option->option_id";
     86                    $query = "UPDATE $tableoptions SET option_value = '$new_val' WHERE option_name = '$option->option_name'";
    8787                    $result = $wpdb->query($query);
    8888                    //if( in_array($option->option_name, $nonbools)) die('boo'.$query);
     
    110110    }
    111111
    112     $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true';
     112     if (strstr($_SERVER['HTTP_REFERER'], '?')) $goback = str_replace('&updated=true', '', $_SERVER['HTTP_REFERER']) . '&updated=true';
     113    else $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true';
    113114    header('Location: ' . $goback);
    114115    break;
  • trunk/wp-admin/upgrade-functions.php

    r1203 r1206  
    732732    if (!get_settings('gmt_offset')) {
    733733        if(!$wpdb->get_var("SELECT * FROM $tableoptions WHERE option_name = 'gmt_offset'")) {
    734             $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)");
     734            $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)");
    735735        }
    736736
  • trunk/wp-includes/functions.php

    r1203 r1206  
    5151
    5252function current_time($type, $gmt = 0) {
    53     $time_difference = get_settings('time_difference');
    5453    switch ($type) {
    5554        case 'mysql':
     
    300299        return false;
    301300    }
    302 
    303     // until we switch to using 'gmt_offset' everywhere
    304     $setting = str_replace('time_difference', 'gmt_offset', $setting);
    305301
    306302    if ( (empty($cache_settings)) ) {
Note: See TracChangeset for help on using the changeset viewer.