Always save and continue except when referred from the permalink page for the post being edited.

git-svn-id: http://svn.automattic.com/wordpress/trunk@7426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-03-20 21:15:05 +00:00
parent fda19a41bf
commit 3f52602fa4
2 changed files with 2 additions and 6 deletions

View File

@ -122,9 +122,7 @@ case 'editpost':
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
if ( isset($_POST['save']) && ( 'draft' == $page->post_status || 'pending' == $page->post_status ) ) {
$location = "page.php?action=edit&post=$page_ID";
} elseif ( isset($_POST['save']) && (empty($referredby) || $referredby == $referer) ) {
if ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
$location = "page.php?action=edit&post=$page_ID";
} elseif ($_POST['addmeta']) {
$location = add_query_arg( 'message', 2, wp_get_referer() );

View File

@ -135,9 +135,7 @@ case 'editpost':
$referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']);
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
if ( isset($_POST['save']) && ( 'draft' == $post->post_status || 'pending' == $post->post_status ) ) {
$location = "post.php?action=edit&post=$post_ID";
} elseif ( isset($_POST['save']) && (empty($referredby) || $referredby == $referer) ) {
if ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
$location = "post.php?action=edit&post=$post_ID";
} elseif (isset($_POST['addmeta']) && $_POST['addmeta']) {
$location = add_query_arg( 'message', 2, wp_get_referer() );