Make sure we can publish private posts. Fixes #5881, #4206.

git-svn-id: https://develop.svn.wordpress.org/trunk@6872 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2008-02-16 16:24:52 +00:00
parent 69f21834fb
commit 8fc5c28128
1 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ function edit_post() {
$_POST['post_status'] = 'draft';
if ('' != $_POST['saveasprivate'] )
$_POST['post_status'] = 'private';
if ('' != $_POST['publish'] )
if ( ( '' != $_POST['publish'] ) && ( $_POST['post_status'] != 'private' ) )
$_POST['post_status'] = 'publish';
if ('' != $_POST['advanced'] )
$_POST['post_status'] = 'draft';
@ -254,7 +254,7 @@ function wp_write_post() {
$_POST['post_status'] = 'draft';
if ('' != $_POST['saveasprivate'] )
$_POST['post_status'] = 'private';
if ('' != $_POST['publish'] )
if ( ( '' != $_POST['publish'] ) && ( $_POST['post_status'] != 'private' ) )
$_POST['post_status'] = 'publish';
if ('' != $_POST['advanced'] )
$_POST['post_status'] = 'draft';