Make WordPress Core

Changeset 13679


Ignore:
Timestamp:
03/11/2010 11:53:03 PM (15 years ago)
Author:
nacin
Message:

Don't allow access to network.php if running an MU network. It is only for networks created in 3.0. see #11816. Also, fix MS htaccess logic, see #12136

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r13660 r13679  
    183183    if ( is_multisite() && !is_main_site() )
    184184        $submenu['tools.php'][25] = array( __('Delete Site'), 'manage_options', 'ms-delete-site.php' );
    185     if ( is_super_admin() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE )
     185    if ( ( ! is_multisite() || defined( 'MULTISITE' ) ) && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE && is_super_admin() )
    186186        $submenu['tools.php'][50] = array(__('Network'), 'manage_options', 'network.php');
    187187
  • trunk/wp-admin/network.php

    r13676 r13679  
    1616if ( ! is_super_admin() )
    1717    wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
     18
     19if ( is_multisite() && ! defined( 'MULTISITE' ) )
     20    wp_die( __('The Network creation panel is not for WordPress MU networks.') );
    1821
    1922// We need to create references to ms global tables to enable Network.
     
    287290
    288291# uploaded files
    289 RewriteRule ^' . ( $vhost ? '([_0-9a-zA-Z-]+/)?' : '' ) . 'files/(.+) wp-includes/ms-files.php?file=$2 [L]' . "\n";
     292RewriteRule ^' . ( $vhost ? '' : '([_0-9a-zA-Z-]+/)?' ) . 'files/(.+) wp-includes/ms-files.php?file=$' . ( $vhost ? 1 : 2 ) . ' [L]' . "\n";
    290293
    291294if ( ! $vhost )
Note: See TracChangeset for help on using the changeset viewer.