Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't redirect back to permalink after editing from Edit This link. f…

…ixes #7503 for 2.6

git-svn-id: http://svn.automattic.com/wordpress/branches/2.6@8626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit bd0d60385d019a83aeff46b13bd7734e62b7ebc6 1 parent 9de212e
ryan authored
View
9 wp-admin/edit-form-advanced.php
@@ -73,14 +73,7 @@
<input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
-<input name="referredby" type="hidden" id="referredby" value="<?php
-if ( !empty($_REQUEST['popupurl']) )
- echo clean_url(stripslashes($_REQUEST['popupurl']));
-else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID )
- echo 'redo';
-else
- echo clean_url(stripslashes(wp_get_referer()));
-?>" />
+<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
<?php echo $form_extra ?>
View
11 wp-admin/edit-page-form.php
@@ -30,10 +30,6 @@
$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';
?>
<?php if ( $notice ) : ?>
@@ -60,12 +56,7 @@
<?php echo $form_extra ?>
<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
-<input name="referredby" type="hidden" id="referredby" value="<?php
-if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID )
- echo 'redo';
-else
- echo clean_url(stripslashes(wp_get_referer()));
-?>" />
+<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
<div id="poststuff">
View
4 wp-admin/post.php
@@ -36,9 +36,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";
Please sign in to comment.
Something went wrong with that request. Please try again.