Make WordPress Core

Changeset 6691


Ignore:
Timestamp:
01/30/2008 08:33:14 PM (17 years ago)
Author:
ryan
Message:

Future post publishing over XML-RPC fixes from markjaquith. fixes #5721

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r6686 r6691  
    12961296
    12971297        // Do some timestamp voodoo
    1298         $dateCreatedd = $content_struct['dateCreated'];
    1299         if (!empty($dateCreatedd)) {
    1300             $dateCreated = $dateCreatedd->getIso();
     1298        if ( !empty( $content_struct['date_created_gmt'] ) )
     1299            $dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force
     1300        elseif ( !empty( $content_struct['dateCreated']) )
     1301            $dateCreated = $content_struct['dateCreated']->getIso();
     1302
     1303        if ( !empty( $dateCreated ) ) {
    13011304            $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
    13021305            $post_date_gmt = iso8601_to_datetime($dateCreated, GMT);
     
    15521555        if ( is_array($to_ping) )
    15531556            $to_ping = implode(' ', $to_ping);
    1554        
     1557
    15551558        // Do some timestamp voodoo
    1556         $dateCreatedd = $content_struct['dateCreated'];
    1557         if (!empty($dateCreatedd)) {
    1558             $dateCreated = $dateCreatedd->getIso();
    1559             $post_date     = get_date_from_gmt(iso8601_to_datetime($dateCreated));
    1560             $post_date_gmt = iso8601_to_datetime($dateCreated . "Z", GMT);
     1559        if ( !empty( $content_struct['date_created_gmt'] ) )
     1560            $dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force
     1561        elseif ( !empty( $content_struct['dateCreated']) )
     1562            $dateCreated = $content_struct['dateCreated']->getIso();
     1563
     1564        if ( !empty( $dateCreated ) ) {
     1565            $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
     1566            $post_date_gmt = iso8601_to_datetime($dateCreated, GMT);
    15611567        } else {
    15621568            $post_date     = $postdata['post_date'];
Note: See TracChangeset for help on using the changeset viewer.