Fix redirect and publish.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
53fcff7767
commit
3c3ab6eea7
|
@ -110,13 +110,18 @@ case 'editpost':
|
|||
|
||||
$post_ID = edit_post();
|
||||
|
||||
$referredby = '';
|
||||
if ( !empty($_POST['referredby']) )
|
||||
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
|
||||
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
|
||||
|
||||
if ($_POST['save']) {
|
||||
$location = wp_get_referer();
|
||||
} elseif ($_POST['updatemeta']) {
|
||||
$location = wp_get_referer() . '&message=2#postcustom';
|
||||
} elseif ($_POST['deletemeta']) {
|
||||
$location = wp_get_referer() . '&message=3#postcustom';
|
||||
} elseif (!empty($_POST['referredby']) && $_POST['referredby'] != wp_get_referer()) {
|
||||
} elseif (!empty($referredby) && $referredby != $referer) {
|
||||
$location = $_POST['referredby'];
|
||||
if ( $_POST['referredby'] == 'redo' )
|
||||
$location = get_permalink( $post_ID );
|
||||
|
|
Loading…
Reference in New Issue