Make WordPress Core

Ticket #28697: 28697.diff

File 28697.diff, 1.3 KB (added by TobiasBg, 11 years ago)
  • src/wp-includes/ms-default-constants.php

    diff --git src/wp-includes/ms-default-constants.php src/wp-includes/ms-default-constants.php
    index 8cbd2c3..b7b58ba 100644
    function ms_subdomain_constants() { 
    119119        static $error = null;
    120120        static $error_warn = false;
    121121
    122         if ( false === $error )
     122        if ( false === $error ) {
    123123                return;
     124        }
    124125
    125126        if ( $error ) {
    126127                $vhost_deprecated = __( 'The constant <code>VHOST</code> <strong>is deprecated</strong>. Use the boolean constant <code>SUBDOMAIN_INSTALL</code> in wp-config.php to enable a subdomain configuration. Use is_subdomain_install() to check whether a subdomain configuration is enabled.' );
    function ms_subdomain_constants() { 
    133134        }
    134135
    135136        if ( defined( 'SUBDOMAIN_INSTALL' ) && defined( 'VHOST' ) ) {
    136                 if ( SUBDOMAIN_INSTALL == ( 'yes' == VHOST ) ) {
    137                         $error = true;
    138                 } else {
    139                         $error = $error_warn = true;
     137                $error = true;
     138                if ( SUBDOMAIN_INSTALL !== ( 'yes' == VHOST ) ) {
     139                        $error_warn = true;
    140140                }
    141141        } elseif ( defined( 'SUBDOMAIN_INSTALL' ) ) {
     142                $error = false;
    142143                define( 'VHOST', SUBDOMAIN_INSTALL ? 'yes' : 'no' );
    143144        } elseif ( defined( 'VHOST' ) ) {
    144145                $error = true;
    145146                define( 'SUBDOMAIN_INSTALL', 'yes' == VHOST );
    146147        } else {
     148                $error = false;
    147149                define( 'SUBDOMAIN_INSTALL', false );
    148150                define( 'VHOST', 'no' );
    149151        }