Make WordPress Core

Changeset 3067


Ignore:
Timestamp:
11/14/2005 06:51:09 AM (20 years ago)
Author:
ryan
Message:

Don't return false from get_settings() when installing. Use update_option() when setting the blog title and admin email so that the cache is kept in sync. fixes #1869

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/install.php

    r3041 r3067  
    142142populate_roles();
    143143
    144 $wpdb->query("UPDATE $wpdb->options SET option_value = '$weblog_title' WHERE option_name = 'blogname'");
    145 $wpdb->query("UPDATE $wpdb->options SET option_value = '$admin_email' WHERE option_name = 'admin_email'");
     144update_option('blogname', $weblog_title);
     145update_option('admin_email', $admin_email);
    146146
    147147// Now drop in some default links
  • trunk/wp-includes/functions.php

    r3054 r3067  
    262262function get_settings($setting) {
    263263    global $wpdb;
    264     if ( strstr($_SERVER['REQUEST_URI'], 'wp-admin/install.php') || defined('WP_INSTALLING') )
    265         return false;
    266264
    267265    $value = wp_cache_get($setting, 'options');
    268266
    269267    if ( false === $value ) {
     268        if ( defined('WP_INSTALLING') )
     269            $wpdb->hide_errors();
    270270        $value = $wpdb->get_row("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
     271        if ( defined('WP_INSTALLING') )
     272            $wpdb->show_errors();
     273
    271274        if( is_object( $value ) ) {
    272275            $value = $value->option_value;
Note: See TracChangeset for help on using the changeset viewer.