From c4dc6ef86001c435e3db4f0d72c327a7124e2af3 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 17 Apr 2009 01:43:53 +0000 Subject: [PATCH] Clean up is_blog_installed(), remove redundant or unnecessary code. see #8947 git-svn-id: https://develop.svn.wordpress.org/trunk@10974 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 8ac12fb02a..2ffc5f8074 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1675,20 +1675,20 @@ function is_blog_installed() { global $wpdb; // Check cache first. If options table goes away and we have true cached, oh well. - if ( wp_cache_get('is_blog_installed') ) + if ( wp_cache_get( 'is_blog_installed' ) ) return true; $suppress = $wpdb->suppress_errors(); $alloptions = wp_load_alloptions(); - // If siteurl is not set to autoload, but other options are loaded, check if it's there - if ( !isset($alloptions['siteurl']) && count($alloptions) > 1 ) + // If siteurl is not set to autoload, check it specifically + if ( !isset( $alloptions['siteurl'] ) ) $installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" ); else $installed = $alloptions['siteurl']; - $wpdb->suppress_errors($suppress); + $wpdb->suppress_errors( $suppress ); - $installed = !empty( $installed ) ? true : false; - wp_cache_set('is_blog_installed', $installed); + $installed = !empty( $installed ); + wp_cache_set( 'is_blog_installed', $installed ); return $installed; }