Make WordPress Core

Changeset 33989


Ignore:
Timestamp:
09/10/2015 03:52:21 AM (9 years ago)
Author:
jeremyfelt
Message:

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

Further reduces the reliance on these unnecessary globals.

Fixes #27264.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-load.php

    r32611 r33989  
    395395 * @access private
    396396 * @since 3.0.0
    397  *
    398  * @global wpdb   $wpdb
    399  * @global string $domain
    400  * @global string $path
    401  */
    402 function ms_not_installed() {
    403     global $wpdb, $domain, $path;
     397 * @since 4.3.0 The `$domain` and `$path` parameters were added.
     398 *
     399 * @global wpdb $wpdb
     400 *
     401 * @param string $domain The requested domain for the error to reference.
     402 * @param string $path   The requested path for the error to reference.
     403 */
     404function ms_not_installed( $domain, $path ) {
     405    global $wpdb;
    404406
    405407    if ( ! is_admin() ) {
  • trunk/src/wp-includes/ms-settings.php

    r28934 r33989  
    7979                wp_cache_add( 'current_network', $current_site, 'site-options' );
    8080            } elseif ( 0 === $wpdb->num_rows ) {
    81                 ms_not_installed();
     81                ms_not_installed( $domain, $path );
    8282            }
    8383        }
     
    8787
    8888        if ( empty( $current_site ) ) {
    89             ms_not_installed();
     89            ms_not_installed( $domain, $path );
    9090        } elseif ( $path === $current_site->path ) {
    9191            $current_blog = get_site_by_path( $domain, $path );
     
    112112    // No network has been found, bail.
    113113    if ( empty( $current_site ) ) {
    114         ms_not_installed();
     114        ms_not_installed( $domain, $path );
    115115    }
    116116
     
    157157             * As we couldn't find a site, we're simply not installed.
    158158             */
    159             ms_not_installed();
     159            ms_not_installed( $domain, $path );
    160160        }
    161161
Note: See TracChangeset for help on using the changeset viewer.