mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
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
git-svn-id: https://develop.svn.wordpress.org/trunk@3067 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -261,13 +261,16 @@ function url_to_postid($url) {
|
||||
|
||||
function get_settings($setting) {
|
||||
global $wpdb;
|
||||
if ( strstr($_SERVER['REQUEST_URI'], 'wp-admin/install.php') || defined('WP_INSTALLING') )
|
||||
return false;
|
||||
|
||||
$value = wp_cache_get($setting, 'options');
|
||||
|
||||
if ( false === $value ) {
|
||||
if ( defined('WP_INSTALLING') )
|
||||
$wpdb->hide_errors();
|
||||
$value = $wpdb->get_row("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
|
||||
if ( defined('WP_INSTALLING') )
|
||||
$wpdb->show_errors();
|
||||
|
||||
if( is_object( $value ) ) {
|
||||
$value = $value->option_value;
|
||||
wp_cache_set($setting, $value, 'options');
|
||||
|
||||
Reference in New Issue
Block a user