Multisite: Remove `$domain` and `$path` globals in `ms_not_installed()`

Further reduces the reliance on these unnecessary globals.

Fixes #27264.

Built from https://develop.svn.wordpress.org/trunk@33989


git-svn-id: http://core.svn.wordpress.org/trunk@33958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2015-09-10 03:53:24 +00:00
parent d1f818a61d
commit 7278744dd0
3 changed files with 12 additions and 10 deletions

View File

@ -394,13 +394,15 @@ function get_site_by_path( $domain, $path, $segments = null ) {
*
* @access private
* @since 3.0.0
* @since 4.3.0 The `$domain` and `$path` parameters were added.
*
* @global wpdb $wpdb
* @global string $domain
* @global string $path
* @global wpdb $wpdb
*
* @param string $domain The requested domain for the error to reference.
* @param string $path The requested path for the error to reference.
*/
function ms_not_installed() {
global $wpdb, $domain, $path;
function ms_not_installed( $domain, $path ) {
global $wpdb;
if ( ! is_admin() ) {
dead_db();

View File

@ -78,7 +78,7 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) {
$current_site = wp_get_network( $one_network );
wp_cache_add( 'current_network', $current_site, 'site-options' );
} elseif ( 0 === $wpdb->num_rows ) {
ms_not_installed();
ms_not_installed( $domain, $path );
}
}
if ( empty( $current_site ) ) {
@ -86,7 +86,7 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) {
}
if ( empty( $current_site ) ) {
ms_not_installed();
ms_not_installed( $domain, $path );
} elseif ( $path === $current_site->path ) {
$current_blog = get_site_by_path( $domain, $path );
} else {
@ -111,7 +111,7 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) {
// No network has been found, bail.
if ( empty( $current_site ) ) {
ms_not_installed();
ms_not_installed( $domain, $path );
}
// @todo Investigate when exactly this can occur.
@ -156,7 +156,7 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) {
* it's no use redirecting back to ourselves -- it'll cause a loop.
* As we couldn't find a site, we're simply not installed.
*/
ms_not_installed();
ms_not_installed( $domain, $path );
}
header( 'Location: ' . $destination );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-33988';
$wp_version = '4.4-alpha-33989';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.