Make WordPress Core

Changeset 8625


Ignore:
Timestamp:
08/12/2008 08:58:00 PM (16 years ago)
Author:
ryan
Message:

Don't redirect back to permalink after editing from Edit This link. fixes #7503 for trunk

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r8600 r8625  
    7777<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
    7878<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
    79 <input name="referredby" type="hidden" id="referredby" value="<?php
    80 if ( !empty($_REQUEST['popupurl']) )
    81     echo clean_url(stripslashes($_REQUEST['popupurl']));
    82 else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID  )
    83     echo 'redo';
    84 else
    85     echo clean_url(stripslashes(wp_get_referer()));
    86 ?>" />
     79<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
    8780<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
    8881
  • trunk/wp-admin/edit-page-form.php

    r8600 r8625  
    3535$user_ID = (int) $user_ID;
    3636
    37 $sendto = clean_url(stripslashes(wp_get_referer()));
    38 
    39 if ( 0 != $post_ID && $sendto == get_permalink($post_ID) )
    40     $sendto = 'redo';
    4137?>
    4238
     
    6561<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
    6662<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
    67 <input name="referredby" type="hidden" id="referredby" value="<?php
    68 if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID )
    69     echo 'redo';
    70 else
    71     echo clean_url(stripslashes(wp_get_referer()));
    72 ?>" />
     63<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
    7364<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
    7465
  • trunk/wp-admin/post.php

    r8600 r8625  
    4040        $location = $_POST['referredby'];
    4141        $location = remove_query_arg('_wp_original_http_referer', $location);
    42         if ( $_POST['referredby'] == 'redo' )
    43             $location = get_permalink( $post_ID );
    44         elseif ( false !== strpos($location, 'edit.php') )
     42        if ( false !== strpos($location, 'edit.php') )
    4543            $location = add_query_arg('posted', $post_ID, $location);
    4644        elseif ( false !== strpos($location, 'wp-admin') )
Note: See TracChangeset for help on using the changeset viewer.