WordPress.org

Make WordPress Core

Ticket #15620: network-setup-fix-bad-base.patch

File network-setup-fix-bad-base.patch, 2.2 KB (added by wpdavis, 3 years ago)
  • wp-admin/network.php

     
    137137        if ( get_option( 'siteurl' ) != get_option( 'home' ) ) { 
    138138                echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . sprintf( __( 'Your <strong>WordPress address</strong> must match your <strong>Site address</strong> before creating a Network. See <a href="%s">General Settings</a>.' ), esc_url( admin_url( 'options-general.php' ) ) ) . '</p></div>'; 
    139139                echo '</div>'; 
    140                 include ('./admin-footer.php' ); 
     140                include ( ABSPATH . 'wp-admin/admin-footer.php' ); 
    141141                die(); 
    142142        } 
    143143 
    144144        if ( defined('DO_NOT_UPGRADE_GLOBAL_TABLES') ) { 
    145145                echo '<div class="error"><p><strong>' . __('Error:') . '</strong> ' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.' ) . '</p></div>'; 
    146146                echo '</div>'; 
    147                 include ('./admin-footer.php' ); 
     147                include ( ABSPATH . 'wp-admin/admin-footer.php' ); 
    148148                die(); 
    149149        } 
    150150 
     
    152152        if ( ! empty( $active_plugins ) ) { 
    153153                echo '<div class="updated"><p><strong>' . __('Warning:') . '</strong> ' . sprintf( __( 'Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.' ), admin_url( 'plugins.php?plugin_status=active' ) ) . '</p></div><p>' . __( 'Once the network is created, you may reactivate your plugins.' ) . '</p>'; 
    154154                echo '</div>'; 
    155                 include( './admin-footer.php' ); 
     155                include( ABSPATH . 'wp-admin/admin-footer.php' ); 
    156156                die(); 
    157157        } 
    158158 
     
    163163                echo '<p>' . sprintf( __( 'You cannot use port numbers such as <code>%s</code>.' ), $has_ports ) . '</p>'; 
    164164                echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Return to Dashboard' ) . '</a>'; 
    165165                echo '</div>'; 
    166                 include( './admin-footer.php' ); 
     166                include( ABSPATH . 'wp-admin/admin-footer.php' ); 
    167167                die(); 
    168168        } 
    169169 
     
    511511        } 
    512512} 
    513513 
    514 $base = trailingslashit( stripslashes( dirname( dirname( $_SERVER['SCRIPT_NAME'] ) ) ) ); 
     514if ( $_POST ) { 
    515515 
    516 if ( $_POST ) { 
     516        $base = trailingslashit( stripslashes( dirname( dirname( $_SERVER['SCRIPT_NAME'] ) ) ) ); 
     517 
    517518        check_admin_referer( 'install-network-1' ); 
    518519 
    519520        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );