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

git-svn-id: http://svn.automattic.com/wordpress/trunk@6872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-02-16 16:24:52 +00:00
parent 1e566cbf6a
commit 251a2ffa0c

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';