Small cleanup

git-svn-id: https://develop.svn.wordpress.org/trunk@3068 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-11-14 08:51:04 +00:00
parent 3098fe172e
commit e1b81babff
1 changed files with 3 additions and 5 deletions

View File

@ -267,16 +267,14 @@ function get_settings($setting) {
if ( false === $value ) {
if ( defined('WP_INSTALLING') )
$wpdb->hide_errors();
$value = $wpdb->get_row("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'");
$value = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting' LIMIT 1");
if ( defined('WP_INSTALLING') )
$wpdb->show_errors();
if( is_object( $value ) ) {
$value = $value->option_value;
if( $value )
wp_cache_set($setting, $value, 'options');
} else {
else
return false;
}
}
// If home is not set use siteurl.