Ticket #15920: 15920.2.patch

File 15920.2.patch, 1.5 KB (added by SergeyBiryukov, 2 years ago)
  • wp-admin/network/edit.php

     
    185185        break; 
    186186 
    187187        case 'allblogs': 
    188                 if ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) { 
     188                if ( ( isset( $_POST['doaction'] ) || isset( $_POST['doaction2'] ) ) && isset( $_POST['allblogs'] ) ) { 
    189189                        check_admin_referer( 'bulk-sites' ); 
    190190 
    191191                        if ( ! current_user_can( 'manage_sites' ) ) 
     
    194194                        if ( $_GET['action'] != -1 || $_POST['action2'] != -1 ) 
    195195                                $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2']; 
    196196 
     197                        $blogfunction = ''; 
    197198 
    198199                        foreach ( (array) $_POST['allblogs'] as $key => $val ) { 
    199200                                if ( $val != '0' && $val != $current_site->blog_id ) { 
     
    374375                if ( !current_user_can( 'manage_network_users' ) ) 
    375376                        wp_die( __( 'You do not have permission to access this page.' ) ); 
    376377 
    377                 if ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) { 
     378                if ( ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) && isset( $_POST['allusers'] ) ) { 
    378379                        check_admin_referer( 'bulk-users-network' ); 
    379380 
    380381                        if ( $_GET['action'] != -1 || $_POST['action2'] != -1 ) 
    381382                                $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2']; 
    382383 
     384                        $userfunction = ''; 
     385 
    383386                        foreach ( (array) $_POST['allusers'] as $key => $val ) { 
    384387                                if ( !empty( $val ) ) { 
    385388                                        switch ( $doaction ) {