Ticket #14897: 14897.9.diff
File 14897.9.diff, 1.9 KB (added by , 14 years ago) |
---|
-
wp-admin/network/themes.php
18 18 $s = isset($_REQUEST['s']) ? $_REQUEST['s'] : ''; 19 19 20 20 // 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']); 22 22 23 23 if ( $action ) { 24 24 $allowed_themes = get_site_option( 'allowedthemes' ); … … 36 36 exit; 37 37 break; 38 38 case 'network-enable-selected': 39 check_admin_referer('bulk-plugins');40 41 39 $themes = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array(); 42 40 if ( empty($themes) ) { 43 41 wp_redirect( wp_get_referer() ); … … 47 45 $allowed_themes[ $theme ] = 1; 48 46 update_site_option( 'allowedthemes', $allowed_themes ); 49 47 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; 63 58 } 64 59 } 65 60