Make WordPress Core


Ignore:
Timestamp:
12/16/2010 08:43:22 AM (15 years ago)
Author:
nacin
Message:

Remove check_permissions() calls outside of AJAX context. Also only check for switch_themes in check_permissions() for the themes table. see #15326.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network/site-themes.php

    r16984 r16990  
    1616$menu_perms = get_site_option( 'menu_items', array() );
    1717
    18 if ( empty( $menu_perms['themes'] ) ) {
    19     if ( !is_super_admin() )
    20         wp_die( __( 'Cheatin’ uh?' ) );
    21 }
     18if ( empty( $menu_perms['themes'] ) && ! is_super_admin() )
     19    wp_die( __( 'Cheatin’ uh?' ) );
    2220
    23 if ( !current_user_can('manage_sites') )
     21if ( ! current_user_can( 'manage_sites' ) )
    2422    wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) );
    2523
     
    3533
    3634$wp_list_table = get_list_table('WP_MS_Themes_List_Table');
    37 $wp_list_table->check_permissions();
    3835
    3936$action = $wp_list_table->current_action();
Note: See TracChangeset for help on using the changeset viewer.