Changeset 6691

Show
Ignore:
Timestamp:
01/30/08 20:33:14 (7 months ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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'];