From 6ff77fabe3421307dd8491eadbba4bcbb633ea65 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 12 Aug 2008 20:58:00 +0000 Subject: [PATCH] Don't redirect back to permalink after editing from Edit This link. fixes #7503 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@8625 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 9 +-------- wp-admin/edit-page-form.php | 11 +---------- wp-admin/post.php | 4 +--- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 0c8d5c9270..4eadc81881 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -76,14 +76,7 @@ $saveasdraft = ' - + post_status ) wp_original_referer_field(true, 'previous'); ?> diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index cc71063079..6bcc8d1d33 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -34,10 +34,6 @@ if ( 0 == $post_ID) { $temp_ID = (int) $temp_ID; $user_ID = (int) $user_ID; -$sendto = clean_url(stripslashes(wp_get_referer())); - -if ( 0 != $post_ID && $sendto == get_permalink($post_ID) ) - $sendto = 'redo'; ?> @@ -64,12 +60,7 @@ if (isset($mode) && 'bookmarklet' == $mode) - + post_status ) wp_original_referer_field(true, 'previous'); ?>
diff --git a/wp-admin/post.php b/wp-admin/post.php index e1c8bb007a..2b3f3ea48d 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -39,9 +39,7 @@ function redirect_post($post_ID = '') { } elseif (!empty($referredby) && $referredby != $referer) { $location = $_POST['referredby']; $location = remove_query_arg('_wp_original_http_referer', $location); - if ( $_POST['referredby'] == 'redo' ) - $location = get_permalink( $post_ID ); - elseif ( false !== strpos($location, 'edit.php') ) + if ( false !== strpos($location, 'edit.php') ) $location = add_query_arg('posted', $post_ID, $location); elseif ( false !== strpos($location, 'wp-admin') ) $location = "post-new.php?posted=$post_ID";