Make WordPress Core

Changeset 6645 for trunk/wp-app.php


Ignore:
Timestamp:
01/23/2008 08:25:08 PM (18 years ago)
Author:
westi
Message:

Fix the updated times when publishing/editing with APP. See #5680 props rubys.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-app.php

    r6635 r6645  
    333333        $post_content = $parsed->content[1];
    334334        $post_excerpt = $parsed->summary[1];
    335         $pubtimes = $this->get_publish_time($parsed->published);
     335        $pubtimes = $this->get_publish_time($entry->published);
    336336        $post_date = $pubtimes[0];
    337337        $post_date_gmt = $pubtimes[1];
     338        $pubtimes = $this->get_publish_time($parsed->updated);
     339        $post_modified = $pubtimes[0];
     340        $post_modified_gmt = $pubtimes[1];
    338341
    339342        // let's not go backwards and make something draft again.
     
    344347        }
    345348
    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');
    347350        $this->escape($postdata);
    348351
     
    473476        $post_title = $parsed->title[1];
    474477        $post_content = $parsed->content[1];
    475 
    476         $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt');
     478        $pubtimes = $this->get_publish_time($parsed->updated);
     479        $post_modified = $pubtimes[0];
     480        $post_modified_gmt = $pubtimes[1];
     481
     482        $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'post_modified', 'post_modified_gmt');
    477483        $this->escape($postdata);
    478484
     
    582588        $post_date = $pubtimes[0];
    583589        $post_date_gmt = $pubtimes[1];
    584 
    585         $post_data = compact('ID', 'post_date', 'post_date_gmt');
     590        $pubtimes = $this->get_publish_time($parsed->updated);
     591        $post_modified = $pubtimes[0];
     592        $post_modified_gmt = $pubtimes[1];
     593
     594        $post_data = compact('ID', 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt');
    586595        $result = wp_update_post($post_data);
    587596
     
    709718        $count = get_option('posts_per_rss');
    710719
    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'));
    712721
    713722        $post = $GLOBALS['post'];
Note: See TracChangeset for help on using the changeset viewer.