Ticket #19027: class-wp-xmlrpc-server.diff
File class-wp-xmlrpc-server.diff, 2.6 KB (added by , 13 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
2777 2777 if ($postdata['post_date'] != '') { 2778 2778 $post_date = mysql2date('Ymd\TH:i:s', $postdata['post_date'], false); 2779 2779 $post_date_gmt = mysql2date('Ymd\TH:i:s', $postdata['post_date_gmt'], false); 2780 $post_modified = mysql2date('Ymd\TH:i:s', $postdata['post_modified'], false); 2781 $post_modified_gmt = mysql2date('Ymd\TH:i:s', $postdata['post_modified_gmt'], false); 2780 2782 2781 2783 // For drafts use the GMT version of the post date 2782 if ( $postdata['post_status'] == 'draft' ) 2784 if ( $postdata['post_status'] == 'draft' ) { 2783 2785 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_date'] ), 'Ymd\TH:i:s' ); 2786 $post_modified_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $postdata['post_modified'] ), 'Ymd\TH:i:s' ); 2787 } 2784 2788 2785 2789 $categories = array(); 2786 2790 $catids = wp_get_post_categories($post_ID); … … 2856 2860 'post_status' => $postdata['post_status'], 2857 2861 'custom_fields' => $this->get_custom_fields($post_ID), 2858 2862 'wp_post_format' => $post_format, 2859 'sticky' => $sticky 2863 'sticky' => $sticky, 2864 'dateModified' => new IXR_Date($post_modified), 2865 'date_modified_gmt' => new IXR_Date($post_modified_gmt) 2860 2866 ); 2861 2867 2862 2868 if ( !empty($enclosure) ) $resp['enclosure'] = $enclosure; … … 2903 2909 2904 2910 $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date'], false); 2905 2911 $post_date_gmt = mysql2date('Ymd\TH:i:s', $entry['post_date_gmt'], false); 2912 $post_modified = mysql2date('Ymd\TH:i:s', $entry['post_modified'], false); 2913 $post_modified_gmt = mysql2date('Ymd\TH:i:s', $entry['post_modified_gmt'], false); 2906 2914 2907 2915 // For drafts use the GMT version of the date 2908 if ( $entry['post_status'] == 'draft' ) 2916 if ( $entry['post_status'] == 'draft' ) { 2909 2917 $post_date_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_date'] ), 'Ymd\TH:i:s' ); 2918 $post_modified_gmt = get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $entry['post_modified'] ), 'Ymd\TH:i:s' ); 2919 } 2910 2920 2911 2921 $categories = array(); 2912 2922 $catids = wp_get_post_categories($entry['ID']); … … 2965 2975 'date_created_gmt' => new IXR_Date($post_date_gmt), 2966 2976 'post_status' => $entry['post_status'], 2967 2977 'custom_fields' => $this->get_custom_fields($entry['ID']), 2968 'wp_post_format' => $post_format 2978 'wp_post_format' => $post_format, 2979 'dateModified' => new IXR_Date($post_modified), 2980 'date_modified_gmt' => new IXR_Date($post_modified_gmt) 2969 2981 ); 2970 2982 2971 2983 }