From f80939fdc272f9e1d8f1efa8305935df19cf0ef3 Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 23 Dec 2010 19:45:19 +0000 Subject: [PATCH] Prevent notices in the allblogs and allusers branches. props SergeyBiryukov, see #15920. git-svn-id: http://svn.automattic.com/wordpress/trunk@17128 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/edit.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-admin/network/edit.php b/wp-admin/network/edit.php index 5ada735a1f..e785d381d9 100644 --- a/wp-admin/network/edit.php +++ b/wp-admin/network/edit.php @@ -185,7 +185,7 @@ switch ( $_GET['action'] ) { break; case 'allblogs': - if ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) { + if ( ( isset( $_POST['doaction'] ) || isset( $_POST['doaction2'] ) ) && isset( $_POST['allblogs'] ) ) { check_admin_referer( 'bulk-sites' ); if ( ! current_user_can( 'manage_sites' ) ) @@ -194,6 +194,7 @@ switch ( $_GET['action'] ) { if ( $_GET['action'] != -1 || $_POST['action2'] != -1 ) $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2']; + $blogfunction = ''; foreach ( (array) $_POST['allblogs'] as $key => $val ) { if ( $val != '0' && $val != $current_site->blog_id ) { @@ -374,12 +375,14 @@ switch ( $_GET['action'] ) { if ( !current_user_can( 'manage_network_users' ) ) wp_die( __( 'You do not have permission to access this page.' ) ); - if ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) { + if ( ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) && isset( $_POST['allusers'] ) ) { check_admin_referer( 'bulk-users-network' ); if ( $_GET['action'] != -1 || $_POST['action2'] != -1 ) $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2']; + $userfunction = ''; + foreach ( (array) $_POST['allusers'] as $key => $val ) { if ( !empty( $val ) ) { switch ( $doaction ) {