Make WordPress Core

Changeset 8374


Ignore:
Timestamp:
07/19/2008 03:29:31 PM (18 years ago)
Author:
westi
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-app.php

    r8267 r8374  
    395395
    396396                $publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ? false : true;
     397                $post_status = ($publish) ? 'publish' : 'draft';
    397398
    398399                extract($entry);
     
    407408                $post_modified = $pubtimes[0];
    408409                $post_modified_gmt = $pubtimes[1];
    409 
    410                 // let's not go backwards and make something draft again.
    411                 if(!$publish && $post_status == 'draft') {
    412                         $post_status = ($publish) ? 'publish' : 'draft';
    413                 } elseif($publish) {
    414                         $post_status = 'publish';
    415                 }
    416410
    417411                $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt');
Note: See TracChangeset for help on using the changeset viewer.