Prevent notices in the allblogs and allusers branches. props SergeyBiryukov, see #15920.
git-svn-id: https://develop.svn.wordpress.org/trunk@17128 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d5444ee24a
commit
1af2adde16
@ -185,7 +185,7 @@ switch ( $_GET['action'] ) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'allblogs':
|
case 'allblogs':
|
||||||
if ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) {
|
if ( ( isset( $_POST['doaction'] ) || isset( $_POST['doaction2'] ) ) && isset( $_POST['allblogs'] ) ) {
|
||||||
check_admin_referer( 'bulk-sites' );
|
check_admin_referer( 'bulk-sites' );
|
||||||
|
|
||||||
if ( ! current_user_can( 'manage_sites' ) )
|
if ( ! current_user_can( 'manage_sites' ) )
|
||||||
@ -194,6 +194,7 @@ switch ( $_GET['action'] ) {
|
|||||||
if ( $_GET['action'] != -1 || $_POST['action2'] != -1 )
|
if ( $_GET['action'] != -1 || $_POST['action2'] != -1 )
|
||||||
$doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
|
$doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
|
||||||
|
|
||||||
|
$blogfunction = '';
|
||||||
|
|
||||||
foreach ( (array) $_POST['allblogs'] as $key => $val ) {
|
foreach ( (array) $_POST['allblogs'] as $key => $val ) {
|
||||||
if ( $val != '0' && $val != $current_site->blog_id ) {
|
if ( $val != '0' && $val != $current_site->blog_id ) {
|
||||||
@ -374,12 +375,14 @@ switch ( $_GET['action'] ) {
|
|||||||
if ( !current_user_can( 'manage_network_users' ) )
|
if ( !current_user_can( 'manage_network_users' ) )
|
||||||
wp_die( __( 'You do not have permission to access this page.' ) );
|
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' );
|
check_admin_referer( 'bulk-users-network' );
|
||||||
|
|
||||||
if ( $_GET['action'] != -1 || $_POST['action2'] != -1 )
|
if ( $_GET['action'] != -1 || $_POST['action2'] != -1 )
|
||||||
$doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
|
$doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
|
||||||
|
|
||||||
|
$userfunction = '';
|
||||||
|
|
||||||
foreach ( (array) $_POST['allusers'] as $key => $val ) {
|
foreach ( (array) $_POST['allusers'] as $key => $val ) {
|
||||||
if ( !empty( $val ) ) {
|
if ( !empty( $val ) ) {
|
||||||
switch ( $doaction ) {
|
switch ( $doaction ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user