Skip to content

Commit

Permalink
Change redirects to use $page_slug and $parent_page with `add_que…
Browse files Browse the repository at this point in the history
…ry_arg()` instead of just concatenating strings
  • Loading branch information
joshbetz committed Jun 19, 2012
1 parent 5630863 commit 6b0b5ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vip-dashboard.php
Expand Up @@ -271,6 +271,7 @@ public function handle_add_users_form() {
}

public function invite_users( $blogids, $emails, $role, $message, $noconfirmation ) {
$redirect = add_query_arg( 'page', $this->page_slug, $this->parent_page );
$errors = $this->create_users($blogids, $emails, $role, $message, $noconfirmation);

if ( isset( $errors ) ) {
Expand All @@ -282,7 +283,7 @@ public function invite_users( $blogids, $emails, $role, $message, $noconfirmatio
} else {
$args = array( 'update' => 'newuserconfimation' );
}
$redirect = add_query_arg( $args, $this->parent_page . '?page=vip_dashboard_users' );
$redirect = add_query_arg( $args, $redirect );
wp_redirect( $redirect );
exit();
}
Expand Down Expand Up @@ -361,7 +362,7 @@ public function handle_promote_users_form() {
return;

check_admin_referer( 'vip-dashboard-bulk-users', 'vip-dashboard-bulk-users' );
$redirect = $this->parent_page . "?page=vip_dashboard_users";
$redirect = add_query_arg( 'page', $this->page_slug, $this->parent_page );

$blogids = array_map('intval', $_REQUEST['blogs']);
$userids = array_map('intval', $_REQUEST['users']);
Expand Down

0 comments on commit 6b0b5ef

Please sign in to comment.