Make WordPress Core

Changeset 8626


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

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

Location:
branches/2.6/wp-admin
Files:
3 edited

Legend:

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

    r8579 r8626  
    7474<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
    7575<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
    76 <input name="referredby" type="hidden" id="referredby" value="<?php
    77 if ( !empty($_REQUEST['popupurl']) )
    78     echo clean_url(stripslashes($_REQUEST['popupurl']));
    79 else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID  )
    80     echo 'redo';
    81 else
    82     echo clean_url(stripslashes(wp_get_referer()));
    83 ?>" />
     76<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
    8477<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
    8578
  • branches/2.6/wp-admin/edit-page-form.php

    r8579 r8626  
    3131$user_ID = (int) $user_ID;
    3232
    33 $sendto = clean_url(stripslashes(wp_get_referer()));
    34 
    35 if ( 0 != $post_ID && $sendto == get_permalink($post_ID) )
    36     $sendto = 'redo';
    3733?>
    3834
     
    6157<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />
    6258<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />
    63 <input name="referredby" type="hidden" id="referredby" value="<?php
    64 if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID )
    65     echo 'redo';
    66 else
    67     echo clean_url(stripslashes(wp_get_referer()));
    68 ?>" />
     59<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
    6960<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
    7061
  • branches/2.6/wp-admin/post.php

    r8033 r8626  
    3737        $location = $_POST['referredby'];
    3838        $location = remove_query_arg('_wp_original_http_referer', $location);
    39         if ( $_POST['referredby'] == 'redo' )
    40             $location = get_permalink( $post_ID );
    41         elseif ( false !== strpos($location, 'edit.php') )
     39        if ( false !== strpos($location, 'edit.php') )
    4240            $location = add_query_arg('posted', $post_ID, $location);       
    4341        elseif ( false !== strpos($location, 'wp-admin') )
Note: See TracChangeset for help on using the changeset viewer.