[wp-trac] [WordPress Trac] #4670: When updating a post via Atom-PP draft/published status is not handled properly

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 24 16:28:08 GMT 2007


#4670: When updating a post via Atom-PP draft/published status is not handled
properly
---------------------+------------------------------------------------------
 Reporter:  placey   |       Owner:  anonymous                         
     Type:  defect   |      Status:  new                               
 Priority:  normal   |   Milestone:                                    
Component:  General  |     Version:  2.2                               
 Severity:  normal   |    Keywords:  app atom-pp draft pulish put entry
---------------------+------------------------------------------------------
 When using APP, if a draft post is updated so as to no longer be a draft,
 that change is not detected and the post remains in draft state.  The
 problem is in the `put_post` function in wp-app.php.  There is a section
 that reads as follows:

 {{{
 $publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ?
 false : true;
 ...
 // let's not go backwards and make something draft again.
 if(!$publish && $post_status == 'draft') {
         $post_status = ($publish) ? 'publish' : 'draft';
 }
 }}}

 The negation of the `$publish` variable in the if statement is incorrect
 (I think).  It should be:

 {{{
 if($publish && $post_status == 'draft') {
         $post_status = ($publish) ? 'publish' : 'draft';
 }
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4670>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list