mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Fix redirect and publish.
git-svn-id: http://svn.automattic.com/wordpress/trunk@4059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2c4a4ac455
commit
33a88217f0
@ -89,13 +89,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
Block a user