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

git-svn-id: https://develop.svn.wordpress.org/trunk@8374 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2008-07-19 15:29:31 +00:00
parent 2be6bcf255
commit 7a97c74168

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