Ticket #5680: ticket_5680.patch
File ticket_5680.patch, 3.0 KB (added by , 17 years ago) |
---|
-
wp-includes/post.php
1883 1883 if ( empty($post_date_gmt) ) 1884 1884 $post_date_gmt = current_time('mysql', 1); 1885 1885 1886 if ( empty($post_modified) ) 1887 $post_modified = $post_date; 1888 if ( empty($post_modified_gmt) ) 1889 $post_modified_gmt = $post_date_gmt; 1890 1886 1891 if ( empty($comment_status) ) { 1887 1892 if ( $update ) 1888 1893 $comment_status = 'closed'; -
wp-app.php
332 332 $post_title = $parsed->title[1]; 333 333 $post_content = $parsed->content[1]; 334 334 $post_excerpt = $parsed->summary[1]; 335 $pubtimes = $this->get_publish_time($ parsed->published);335 $pubtimes = $this->get_publish_time($entry->published); 336 336 $post_date = $pubtimes[0]; 337 337 $post_date_gmt = $pubtimes[1]; 338 $pubtimes = $this->get_publish_time($parsed->updated); 339 $post_modified = $pubtimes[0]; 340 $post_modified_gmt = $pubtimes[1]; 338 341 339 342 // let's not go backwards and make something draft again. 340 343 if(!$publish && $post_status == 'draft') { … … 343 346 $post_status = 'publish'; 344 347 } 345 348 346 $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_date', 'post_date_gmt' );349 $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt'); 347 350 $this->escape($postdata); 348 351 349 352 $result = wp_update_post($postdata); … … 472 475 473 476 $post_title = $parsed->title[1]; 474 477 $post_content = $parsed->content[1]; 478 $pubtimes = $this->get_publish_time($parsed->updated); 479 $post_modified = $pubtimes[0]; 480 $post_modified_gmt = $pubtimes[1]; 475 481 476 $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt' );482 $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_modified', 'post_modified_gmt'); 477 483 $this->escape($postdata); 478 484 479 485 $result = wp_update_post($postdata); … … 581 587 $pubtimes = $this->get_publish_time($entry->published); 582 588 $post_date = $pubtimes[0]; 583 589 $post_date_gmt = $pubtimes[1]; 590 $pubtimes = $this->get_publish_time($parsed->updated); 591 $post_modified = $pubtimes[0]; 592 $post_modified_gmt = $pubtimes[1]; 584 593 585 $post_data = compact('ID', 'post_date', 'post_date_gmt' );594 $post_data = compact('ID', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt'); 586 595 $result = wp_update_post($post_data); 587 596 588 597 if (!$result) { … … 708 717 709 718 $count = get_option('posts_per_rss'); 710 719 711 wp('what_to_show=posts&posts_per_page=' . $count . '&offset=' . ($count * ($page-1) ));720 wp('what_to_show=posts&posts_per_page=' . $count . '&offset=' . ($count * ($page-1) . '&orderby=modified')); 712 721 713 722 $post = $GLOBALS['post']; 714 723 $posts = $GLOBALS['posts'];