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

git-svn-id: http://svn.automattic.com/wordpress/trunk@7759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-04-21 17:54:56 +00:00
parent 8d6d1af393
commit 23fd331b4a
2 changed files with 7 additions and 2 deletions

View File

@@ -10,8 +10,10 @@ function redirect_post($post_ID = '') {
global $action;
$referredby = '';
if ( !empty($_POST['referredby']) )
if ( !empty($_POST['referredby']) ) {
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
$referredby = remove_query_arg('_wp_original_http_referer', $referredby);
}
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
if ( !empty($_POST['mode']) && 'bookmarklet' == $_POST['mode'] ) {