Ticket #7299: FixAtomPubDrafts.diff
File FixAtomPubDrafts.diff, 940 bytes (added by , 17 years ago) |
---|
-
wp-app.php
394 394 $this->auth_required(__('Sorry, you do not have the right to edit this post.')); 395 395 396 396 $publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ? false : true; 397 $post_status = ($publish) ? 'publish' : 'draft'; 397 398 398 399 extract($entry); 399 400 … … 407 408 $post_modified = $pubtimes[0]; 408 409 $post_modified_gmt = $pubtimes[1]; 409 410 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 }416 417 411 $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt'); 418 412 $this->escape($postdata); 419 413