Ensure that AtomPub does not auto-publish draft posts when they are edited. Fixes #7299 for trunk props redsweater.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-07-19 15:29:31 +00:00
parent e97a8af5de
commit 1832ab2c52
1 changed files with 1 additions and 7 deletions

View File

@ -394,6 +394,7 @@ EOD;
$this->auth_required(__('Sorry, you do not have the right to edit this post.'));
$publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ? false : true;
$post_status = ($publish) ? 'publish' : 'draft';
extract($entry);
@ -407,13 +408,6 @@ EOD;
$post_modified = $pubtimes[0];
$post_modified_gmt = $pubtimes[1];
// let's not go backwards and make something draft again.
if(!$publish && $post_status == 'draft') {
$post_status = ($publish) ? 'publish' : 'draft';
} elseif($publish) {
$post_status = 'publish';
}
$postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt');
$this->escape($postdata);