User is_super_admin(). Props GIGALinux. see #11644

git-svn-id: http://svn.automattic.com/wordpress/trunk@12646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-07 15:52:22 +00:00
parent 53324a6983
commit 4c92a634a3
5 changed files with 9 additions and 12 deletions

View File

@ -14,9 +14,8 @@ add_action( 'admin_head', 'index_css' );
require_once('admin-header.php');
if ( is_site_admin() == false ) {
if ( !is_super_admin() )
wp_die( __('You do not have permission to access this page.') );
}
global $wpdb;
$c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}");

View File

@ -4,9 +4,8 @@ require_once('admin.php');
if ( !is_multisite() )
wp_die( __('Multisite support is not enabled.') );
if( is_site_admin() == false ) {
if ( !is_super_admin() )
wp_die( __('You do not have permission to access this page.') );
}
do_action('wpmuadminedit', '');

View File

@ -10,9 +10,10 @@ $parent_file = 'ms-admin.php';
wp_enqueue_script( 'admin-forms' );
require_once('admin-header.php');
if( is_site_admin() == false ) {
wp_die( __('You do not have permission to access this page.') );
}
if ( !is_super_admin() )
wp_die( __('You do not have permission to access this page.') );
$id = intval( $_GET['id'] );
$protocol = is_ssl() ? 'https://' : 'http://';

View File

@ -10,9 +10,8 @@ $title = __('Upgrade Site');
$parent_file = 'ms-admin.php';
require_once('admin-header.php');
if ( is_site_admin() == false ) {
wp_die( __('You do not have permission to access this page.') );
}
if ( !is_super_admin() )
wp_die( __('You do not have permission to access this page.') );
echo '<div class="wrap">';
echo '<h2>'.__('Upgrade Site').'</h2>';

View File

@ -11,9 +11,8 @@ wp_enqueue_script( 'admin-forms' );
require_once('admin-header.php');
if( is_site_admin() == false ) {
if ( !is_super_admin() )
wp_die( __('You do not have permission to access this page.') );
}
if ( $_GET['updated'] == 'true' ) {
?>