mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 15:31:42 +01:00
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:
parent
79b1cc7492
commit
f80939fdc2
@ -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