From 20f50e7f063d62c33d405600cfc2cf6e23e43bfc Mon Sep 17 00:00:00 2001 From: nacin Date: Sat, 20 Feb 2010 13:51:32 +0000 Subject: [PATCH] Rename is_installed() to ms_not_installed(). See #12083 git-svn-id: http://svn.automattic.com/wordpress/trunk@13253 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/load.php | 14 +++++++------- wp-includes/ms-load.php | 9 +++------ wp-includes/ms-settings.php | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/wp-includes/load.php b/wp-includes/load.php index c4f5ff9407..fcea2e018b 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -381,18 +381,18 @@ function wp_start_object_cache() { */ function wp_not_installed() { if ( is_multisite() ) { - if ( !is_blog_installed() && !defined( 'WP_INSTALLING' ) ) + if ( ! is_blog_installed() && ! defined( 'WP_INSTALLING' ) ) wp_die( __( 'The blog you have requested is not installed properly. Please contact the system administrator.' ) ); - } elseif ( !is_blog_installed() && ( strpos( $_SERVER['PHP_SELF'], 'install.php' ) === false && !defined( 'WP_INSTALLING' ) ) ) { + } elseif ( ! is_blog_installed() && false === strpos( $_SERVER['PHP_SELF'], 'install.php' ) && !defined( 'WP_INSTALLING' ) ) { if ( defined( 'WP_SITEURL' ) ) $link = WP_SITEURL . '/wp-admin/install.php'; - elseif ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false ) + elseif ( false !== strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) ) $link = preg_replace( '|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF'] ) . 'wp-admin/install.php'; else $link = preg_replace( '|/[^/]+?$|', '/', $_SERVER['PHP_SELF'] ) . 'wp-admin/install.php'; - require_once( ABSPATH . WPINC . '/kses.php' ); - require_once( ABSPATH . WPINC . '/pluggable.php' ); - require_once( ABSPATH . WPINC . '/formatting.php' ); + require( ABSPATH . WPINC . '/kses.php' ); + require( ABSPATH . WPINC . '/pluggable.php' ); + require( ABSPATH . WPINC . '/formatting.php' ); wp_redirect( $link ); die(); } @@ -559,7 +559,7 @@ function is_admin() { /** * Whether Multisite support is enabled * - * @since 3.0 + * @since 3.0.0 * * @return bool True if multisite is enabled, false otherwise. */ diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php index 9980134534..785a829837 100644 --- a/wp-includes/ms-load.php +++ b/wp-includes/ms-load.php @@ -176,19 +176,16 @@ function wpmu_current_site() { } /** - * Displays a failure message when blog does not exist. + * Displays a failure message. * - * Checks for a missing $wpdb->site table as well. + * Used when blog does not exist. Checks for a missing $wpdb->site table as well. * * @todo Merge with is_blog_installed(), dead_db(), wp_not_installed(), etc. * @access private * @since 3.0.0 */ -function is_installed() { +function ms_not_installed() { global $wpdb, $domain, $path; - $base = stripslashes( $base ); - if ( defined( 'WP_INSTALLING' ) ) - return; $msg = '

' . esc_html__( 'Fatal Error' ) . '

'; $msg = '

' . __( 'If your blog does not display, please contact the owner of this site.' ) . '

'; diff --git a/wp-includes/ms-settings.php b/wp-includes/ms-settings.php index 8242b2498e..92f82ec405 100644 --- a/wp-includes/ms-settings.php +++ b/wp-includes/ms-settings.php @@ -94,7 +94,7 @@ if ( ! defined( 'WP_INSTALLING' ) ) { $current_blog = get_blog_details( array('domain' => $current_site->domain, 'path' => $current_site->path), false ); } if ( ! $current_blog || ! $current_site ) - is_installed(); + ms_not_installed(); } $blog_id = $current_blog->blog_id;