WordPress.org

Make WordPress Core

Changeset 7564


Ignore:
Timestamp:
03/29/2008 06:47:30 AM (13 years ago)
Author:
markjaquith
Message:

Sync page edit and post edit redirect message usage a bit more -- properly exclude the page.php file from the "go back" link for page edits.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/page.php

    r7527 r7564  
    1818        $location = 'sidebar.php?a=b';
    1919    } elseif ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
    20         if ( $_POST['_wp_original_http_referer'] && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false )
     20        if ( $_POST['_wp_original_http_referer'] && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page-new.php') === false )
    2121            $location = add_query_arg( '_wp_original_http_referer', urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ), "page.php?action=edit&post=$page_ID&message=1" );
    2222        else
    23             $location = "page.php?action=edit&post=$page_ID";
     23            $location = "page.php?action=edit&post=$page_ID&message=4";
    2424    } elseif ($_POST['addmeta']) {
    2525        $location = add_query_arg( 'message', 2, wp_get_referer() );
  • trunk/wp-admin/post.php

    r7540 r7564  
    2020        $location = 'sidebar.php?a=b';
    2121    } elseif ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
    22         if ( $_POST['_wp_original_http_referer'] && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false )
     22        if ( $_POST['_wp_original_http_referer'] && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post-new.php') === false )
    2323            $location = add_query_arg( '_wp_original_http_referer', urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ), "post.php?action=edit&post=$post_ID&message=1" );
    2424        else
Note: See TracChangeset for help on using the changeset viewer.