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
This commit is contained in:
nacin 2010-12-23 19:45:19 +00:00
parent 79b1cc7492
commit f80939fdc2
1 changed files with 5 additions and 2 deletions

View File

@ -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 ) {