From 27da557de414cb27be445b855dbc515c1b51961c Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 15 Nov 2006 22:23:43 +0000 Subject: [PATCH] backport of post-redirect exit() fixes from [4467] and [4468] git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4470 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/categories.php | 4 +++- wp-admin/link-manager.php | 6 ++++++ wp-admin/post.php | 2 +- wp-admin/users.php | 13 +++++++++---- wp-includes/version.php | 2 +- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 30d37c8b4b..2cf8997fd1 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -33,6 +33,7 @@ case 'addcat': wp_insert_category($_POST); wp_redirect('categories.php?message=1#addcat'); + exit; break; case 'delete': @@ -51,7 +52,7 @@ case 'delete': wp_delete_category($cat_ID); wp_redirect('categories.php?message=2'); - + exit; break; case 'edit': @@ -106,6 +107,7 @@ case 'editedcat': wp_update_category($_POST); wp_redirect('categories.php?message=3'); + exit; break; default: diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index 4818397941..3c90a8062f 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -63,6 +63,7 @@ switch ($action) { $q = $wpdb->query("update $wpdb->links SET link_owner='$newowner' WHERE link_id IN ($all_links)"); wp_redirect($this_file); + exit; break; } case 'visibility': @@ -100,6 +101,7 @@ switch ($action) { } wp_redirect($this_file); + exit; break; } case 'move': @@ -120,6 +122,7 @@ switch ($action) { $q = $wpdb->query("update $wpdb->links SET link_category='$category' WHERE link_id IN ($all_links)"); wp_redirect($this_file); + exit(); break; } @@ -130,6 +133,7 @@ switch ($action) { add_link(); wp_redirect(wp_get_referer() . '?added=true'); + exit; break; } // end Add @@ -151,6 +155,7 @@ switch ($action) { setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600); wp_redirect($this_file); + exit; break; } // end Save @@ -174,6 +179,7 @@ switch ($action) { $links_show_cat_id = $cat_id; setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600); wp_redirect($this_file); + exit; break; } // end Delete diff --git a/wp-admin/post.php b/wp-admin/post.php index d34d1e8a1e..c837b1033f 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -338,7 +338,7 @@ case 'editedcomment': $location = ( empty($_POST['referredby']) ? "edit.php?p=$comment_post_ID&c=1" : $_POST['referredby'] ) . '#comment-' . $comment_ID; $location = apply_filters('comment_edit_redirect', $location, $comment_ID); wp_redirect($location); - + exit(); break; default: diff --git a/wp-admin/users.php b/wp-admin/users.php index 8f58fe4dba..fcd4fe03e8 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -15,6 +15,7 @@ case 'promote': if (empty($_POST['users'])) { wp_redirect('users.php'); + exit(); } if ( !current_user_can('edit_users') ) @@ -34,6 +35,7 @@ case 'promote': } wp_redirect('users.php?update=' . $update); + exit(); break; @@ -43,6 +45,7 @@ case 'dodelete': if ( empty($_POST['users']) ) { wp_redirect('users.php'); + exit(); } if ( !current_user_can('edit_users') ) @@ -67,15 +70,17 @@ case 'dodelete': } wp_redirect('users.php?update=' . $update); - + exit(); break; case 'delete': check_admin_referer('bulk-users'); - if ( empty($_POST['users']) ) + if ( empty($_POST['users']) ) { wp_redirect('users.php'); + exit(); + } if ( !current_user_can('edit_users') ) $error['edit_users'] = __('You can’t delete users.'); @@ -135,9 +140,9 @@ case 'adduser': $errors = add_user(); - if(count($errors) == 0) { + if ( count($errors) == 0 ) { wp_redirect('users.php?update=add'); - die(); + exit(); } default: diff --git a/wp-includes/version.php b/wp-includes/version.php index 60c6d218e7..baef46374e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -2,7 +2,7 @@ // This just holds the version number, in a separate file so we can bump it without cluttering the SVN -$wp_version = '2.0.5'; +$wp_version = '2.0.5.1-beta-1'; $wp_db_version = 3441; ?>