From a4621924db0826ff91844051b83efec1d173f3f3 Mon Sep 17 00:00:00 2001 From: scribu Date: Thu, 4 Nov 2010 20:11:08 +0000 Subject: [PATCH] Network Themes cleanup. Props PeteMall. See #14897 git-svn-id: http://svn.automattic.com/wordpress/trunk@16193 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/themes.php | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php index db96add706..301412662b 100644 --- a/wp-admin/network/themes.php +++ b/wp-admin/network/themes.php @@ -14,11 +14,10 @@ $wp_list_table->check_permissions(); $action = $wp_list_table->current_action(); -$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : ''; $s = isset($_REQUEST['s']) ? $_REQUEST['s'] : ''; // Clean up request URI from temporary args for screen options/paging uri's to work as expected. -$_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']); +$_SERVER['REQUEST_URI'] = remove_query_arg(array('network-enable', 'network-disable', 'network-enable-selected', 'network-disable-selected'), $_SERVER['REQUEST_URI']); if ( $action ) { $allowed_themes = get_site_option( 'allowedthemes' ); @@ -36,8 +35,6 @@ if ( $action ) { exit; break; case 'network-enable-selected': - check_admin_referer('bulk-plugins'); - $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); if ( empty($themes) ) { wp_redirect( wp_get_referer() ); @@ -47,19 +44,16 @@ if ( $action ) { $allowed_themes[ $theme ] = 1; update_site_option( 'allowedthemes', $allowed_themes ); break; - case 'network-disable-selected': - check_admin_referer('bulk-plugins'); - - $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); - if ( empty($themes) ) { - wp_redirect( wp_get_referer() ); - exit; - } - foreach( (array) $themes as $theme ) - unset( $allowed_themes[ $theme ] ); - update_site_option( 'allowedthemes', $allowed_themes ); - break; - + case 'network-disable-selected': + $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); + if ( empty($themes) ) { + wp_redirect( wp_get_referer() ); + exit; + } + foreach( (array) $themes as $theme ) + unset( $allowed_themes[ $theme ] ); + update_site_option( 'allowedthemes', $allowed_themes ); + break; } }