From c6d3eafb7e867aa0703275c1e51d8fc0921554ee Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Fri, 2 Mar 2012 22:01:41 +0000 Subject: [PATCH] Drop unnecessary if-statements which also have some strange logic. Fixes #20159. git-svn-id: https://develop.svn.wordpress.org/trunk@20092 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/network/sites.php | 4 +--- wp-admin/network/users.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php index b910eb9d81..d13a1a0aff 100644 --- a/wp-admin/network/sites.php +++ b/wp-admin/network/sites.php @@ -78,9 +78,7 @@ if ( isset( $_GET['action'] ) ) { if ( ! current_user_can( 'manage_sites' ) ) wp_die( __( 'You do not have permission to access this page.' ) ); - 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 ) { diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php index 25d853d9f0..d26b71209d 100644 --- a/wp-admin/network/users.php +++ b/wp-admin/network/users.php @@ -119,9 +119,7 @@ if ( isset( $_GET['action'] ) ) { if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) { check_admin_referer( 'bulk-users-network' ); - 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 ) {