WordPress.org

Make WordPress Core

Changeset 7760


Ignore:
Timestamp:
04/21/08 17:56:07 (7 years ago)
Author:
ryan
Message:

Post and page edit redirect fixes. fixes #6720 for 2.5

Location:
branches/2.5/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-admin/page.php

    r7564 r7760  
    99function redirect_page($page_ID) { 
    1010    $referredby = ''; 
    11     if ( !empty($_POST['referredby']) ) 
     11    if ( !empty($_POST['referredby']) ) { 
    1212        $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']); 
     13        $referredby = remove_query_arg('_wp_original_http_referer', $referredby); 
     14    } 
    1315    $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer()); 
    1416 
     
    3234    } elseif (!empty($referredby) && $referredby != $referer) { 
    3335        $location = $_POST['referredby']; 
     36        $location = remove_query_arg('_wp_original_http_referer', $location); 
    3437        if ( $_POST['referredby'] == 'redo' ) 
    3538            $location = get_permalink( $page_ID ); 
  • branches/2.5/wp-admin/post.php

    r7564 r7760  
    1111 
    1212    $referredby = ''; 
    13     if ( !empty($_POST['referredby']) ) 
     13    if ( !empty($_POST['referredby']) ) { 
    1414        $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']); 
     15        $referredby = remove_query_arg('_wp_original_http_referer', $referredby); 
     16    } 
    1517    $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer()); 
    1618 
Note: See TracChangeset for help on using the changeset viewer.