WordPress.org

Make WordPress Core

Ticket #11644: 11644.3.diff

File 11644.3.diff, 2.3 KB (added by GIGALinux, 11 years ago)

Use is_super_admin() instead of is_site_admin()

  • ms-admin.php

     
    1414
    1515require_once('admin-header.php');
    1616
    17 if ( is_site_admin() == false ) {
     17if ( !is_super_admin() )
    1818        wp_die( __('You do not have permission to access this page.') );
    19 }
    2019
    2120global $wpdb;
    2221$c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}");
  • ms-edit.php

     
    44if ( !is_multisite() )
    55        wp_die( __('Multisite support is not enabled.') );
    66
    7 if( is_site_admin() == false ) {
     7if ( !is_super_admin() )
    88        wp_die( __('You do not have permission to access this page.') );
    9 }
    109
    1110do_action('wpmuadminedit', '');
    1211
  • ms-sites.php

     
    1010wp_enqueue_script( 'admin-forms' );
    1111
    1212require_once('admin-header.php');
    13 if( is_site_admin() == false ) {
    14     wp_die( __('You do not have permission to access this page.') );
    15 }
     13
     14if ( !is_super_admin() )
     15        wp_die( __('You do not have permission to access this page.') );
     16
    1617$id = intval( $_GET['id'] );
    1718$protocol = is_ssl() ? 'https://' : 'http://';
    1819
  • ms-upgrade-site.php

     
    1010$parent_file = 'ms-admin.php';
    1111require_once('admin-header.php');
    1212
    13 if ( is_site_admin() == false ) {
    14     wp_die( __('You do not have permission to access this page.') );
    15 }
     13if ( !is_super_admin() )
     14        wp_die( __('You do not have permission to access this page.') );
    1615
    1716echo '<div class="wrap">';
    1817echo '<h2>'.__('Upgrade Site').'</h2>';
  • ms-users.php

     
    1111
    1212require_once('admin-header.php');
    1313
    14 if( is_site_admin() == false ) {
     14if ( !is_super_admin() )
    1515        wp_die( __('You do not have permission to access this page.') );
    16 }
    1716
    1817if ( $_GET['updated'] == 'true' ) {
    1918        ?>