Make WordPress Core

Ticket #14897: 14897.9.diff

File 14897.9.diff, 1.9 KB (added by PeteMall, 14 years ago)

Cleanup.

  • wp-admin/network/themes.php

     
    1818$s = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
    1919
    2020// Clean up request URI from temporary args for screen options/paging uri's to work as expected.
    21 $_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']);
     21$_SERVER['REQUEST_URI'] = remove_query_arg(array('network-enable', 'network-disable', 'network-enable-selected', 'network-disable-selected'), $_SERVER['REQUEST_URI']);
    2222
    2323if ( $action ) {
    2424        $allowed_themes = get_site_option( 'allowedthemes' );   
     
    3636                        exit;
    3737                        break;
    3838                case 'network-enable-selected':
    39                         check_admin_referer('bulk-plugins');
    40 
    4139                        $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
    4240                        if ( empty($themes) ) {
    4341                                wp_redirect( wp_get_referer() );
     
    4745                                $allowed_themes[ $theme ] = 1;
    4846                        update_site_option( 'allowedthemes', $allowed_themes );
    4947                        break;
    50                         case 'network-disable-selected':
    51                                 check_admin_referer('bulk-plugins');
    52 
    53                                 $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
    54                                 if ( empty($themes) ) {
    55                                         wp_redirect( wp_get_referer() );
    56                                         exit;
    57                                 }                                               
    58                                 foreach( (array) $themes as $theme )
    59                                         unset( $allowed_themes[ $theme ] );
    60                                 update_site_option( 'allowedthemes', $allowed_themes );
    61                                 break;
    62 
     48                case 'network-disable-selected':
     49                        $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
     50                        if ( empty($themes) ) {
     51                                wp_redirect( wp_get_referer() );
     52                                exit;
     53                        }                                               
     54                        foreach( (array) $themes as $theme )
     55                                unset( $allowed_themes[ $theme ] );
     56                        update_site_option( 'allowedthemes', $allowed_themes );
     57                        break;
    6358        }
    6459}
    6560