~canonical-sysadmins/wordpress/3.9.x

« back to all changes in this revision

Viewing changes to xmlrpc.php

  • Committer: Chris Jones
  • Date: 2009-11-12 19:39:15 UTC
  • Revision ID: cmsj@tenshu.net-20091112193915-tar3mrp53whe6e4t
[CJ] Import wp 2.8.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
526
526
                        $page_date = mysql2date("Ymd\TH:i:s", $page->post_date, false);
527
527
                        $page_date_gmt = mysql2date("Ymd\TH:i:s", $page->post_date_gmt, false);
528
528
 
 
529
                        // For drafts use the GMT version of the date
 
530
                        if ( $page->post_status == 'draft' ) {
 
531
                                $page_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page->post_date ), 'Ymd\TH:i:s' );
 
532
                        }
 
533
 
529
534
                        // Pull the categories info together.
530
535
                        $categories = array();
531
536
                        foreach(wp_get_post_categories($page->ID) as $cat_id) {
790
795
                                post_title page_title,
791
796
                                post_parent page_parent_id,
792
797
                                post_date_gmt,
793
 
                                post_date
 
798
                                post_date,
 
799
                                post_status
794
800
                        FROM {$wpdb->posts}
795
801
                        WHERE post_type = 'page'
796
802
                        ORDER BY ID
805
811
                        $page_list[$i]->dateCreated = new IXR_Date($post_date);
806
812
                        $page_list[$i]->date_created_gmt = new IXR_Date($post_date_gmt);
807
813
 
 
814
                        // For drafts use the GMT version of the date
 
815
                        if ( $page_list[$i]->post_status == 'draft' ) {
 
816
                                $page_list[$i]->date_created_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $page_list[$i]->post_date ), 'Ymd\TH:i:s' );
 
817
                                $page_list[$i]->date_created_gmt = new IXR_Date( $page_list[$i]->date_created_gmt );
 
818
                        }
 
819
 
808
820
                        unset($page_list[$i]->post_date_gmt);
809
821
                        unset($page_list[$i]->post_date);
 
822
                        unset($page_list[$i]->post_status);
810
823
                }
811
824
 
812
825
                return($page_list);
2576
2589
 
2577
2590
                        // For drafts use the GMT version of the post date
2578
2591
                        if ( $postdata['post_status'] == 'draft' ) {
2579
 
                                $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ) );
2580
 
                                $post_date_gmt = preg_replace( '|\-|', '', $post_date_gmt );
2581
 
                                $post_date_gmt = preg_replace( '| |', 'T', $post_date_gmt );
 
2592
                                $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ), 'Ymd\TH:i:s' );
2582
2593
                        }
2583
2594
 
2584
2595
                        $categories = array();
2697
2708
                        $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false);
2698
2709
                        $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false);
2699
2710
 
 
2711
                        // For drafts use the GMT version of the date
 
2712
                        if ( $entry['post_status'] == 'draft' ) {
 
2713
                                $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' );
 
2714
                        }
 
2715
 
2700
2716
                        $categories = array();
2701
2717
                        $catids = wp_get_post_categories($entry['ID']);
2702
2718
                        foreach($catids as $catid) {
2932
2948
                        $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false);
2933
2949
                        $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false);
2934
2950
 
 
2951
                        // For drafts use the GMT version of the date
 
2952
                        if ( $entry['post_status'] == 'draft' ) {
 
2953
                                $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' );
 
2954
                        }
 
2955
 
2935
2956
                        $struct[] = array(
2936
2957
                                'dateCreated' => new IXR_Date($post_date),
2937
2958
                                'userid' => $entry['post_author'],