Make WordPress Core

Changeset 10974


Ignore:
Timestamp:
04/17/2009 01:43:53 AM (17 years ago)
Author:
markjaquith
Message:

Clean up is_blog_installed(), remove redundant or unnecessary code. see #8947

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r10972 r10974  
    16761676
    16771677        // Check cache first. If options table goes away and we have true cached, oh well.
    1678         if ( wp_cache_get('is_blog_installed') )
     1678        if ( wp_cache_get( 'is_blog_installed' ) )
    16791679                return true;
    16801680
    16811681        $suppress = $wpdb->suppress_errors();
    16821682        $alloptions = wp_load_alloptions();
    1683         // If siteurl is not set to autoload, but other options are loaded, check if it's there
    1684         if ( !isset($alloptions['siteurl']) && count($alloptions) > 1 )
     1683        // If siteurl is not set to autoload, check it specifically
     1684        if ( !isset( $alloptions['siteurl'] ) )
    16851685                $installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" );
    16861686        else
    16871687                $installed = $alloptions['siteurl'];
    1688         $wpdb->suppress_errors($suppress);
    1689 
    1690         $installed = !empty( $installed ) ? true : false;
    1691         wp_cache_set('is_blog_installed', $installed);
     1688        $wpdb->suppress_errors( $suppress );
     1689
     1690        $installed = !empty( $installed );
     1691        wp_cache_set( 'is_blog_installed', $installed );
    16921692
    16931693        return $installed;
Note: See TracChangeset for help on using the changeset viewer.