Make WordPress Core

Changeset 1659


Ignore:
Timestamp:
09/14/2004 05:20:22 PM (22 years ago)
Author:
michelvaldrighi
Message:

fixed comment_status screwup, removed debug stuff, screwed up big time, ate a cheese sandwich

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r1658 r1659  
    1414$post_default_category = 1; // posts submitted via the xmlrpc interface go into that category
    1515
    16 $xmlrpc_logging = 1;
     16$xmlrpc_logging = 0;
    1717
    1818function logIO($io,$msg) {
     
    476476          }
    477477
    478           $post_author = $userdata->ID;
     478          $post_author = $user_data->ID;
    479479
    480480          $post_title = $content_struct['title'];
     
    485485          $post_more = $content_struct['mt_text_more'];
    486486
    487           $comment_status = $content_struct['mt_allow_comments'] ? 'open' : 'closed';
    488           $ping_status = $content_struct['mt_allow_pings'] ? 'open' : 'closed';
     487          $comment_status = (empty($content_struct['mt_allow_comments'])) ?
     488            get_settings('default_comment_status')
     489            : $content_struct['mt_allow_comments'];
     490
     491          $ping_status = (empty($content_struct['mt_allow_pings'])) ?
     492            get_settings('default_ping_status')
     493            : $content_struct['mt_allow_pings'];
    489494
    490495          if ($post_more) {
     
    493498               
    494499          // Do some timestamp voodoo
    495           $dateCreated = $content_struct['dateCreated'];
     500          $dateCreatedd = $content_struct['dateCreated'];
     501          $dateCreated = $dateCreatedd->getIso();
    496502          if (!empty($dateCreated)) {
    497503            $post_date     = get_date_from_gmt(iso8601_to_datetime($dateCreated));
     
    572578          }
    573579
    574           $comment_status = (1 == $content_struct['mt_allow_comments']) ? 'open' : 'closed';
    575           $ping_status = $content_struct['mt_allow_pings'] ? 'open' : 'closed';
     580          $comment_status = (empty($content_struct['mt_allow_comments'])) ?
     581            get_settings('default_comment_status')
     582            : $content_struct['mt_allow_comments'];
     583
     584          $ping_status = (empty($content_struct['mt_allow_pings'])) ?
     585            get_settings('default_ping_status')
     586            : $content_struct['mt_allow_pings'];
    576587
    577588          // Do some timestamp voodoo
    578589          $dateCreated = $content_struct['dateCreated'];
     590          $dateCreated = $dateCreated->getIso();
    579591          if (!empty($dateCreated)) {
    580592            $post_date     = get_date_from_gmt(iso8601_to_datetime($dateCreated));
     
    641653              'link' => $link,
    642654              'permaLink' => $link,
     655// commented out because no other tool seems to use them
    643656//            'content' => $entry['post_content'],
    644657//            'categories' => $categories
     
    698711              'link' => $link,
    699712              'permaLink' => $link,
     713// commented out because no other tool seems to use them
    700714//            'content' => $entry['post_content'],
    701715//            'categories' => $categories
Note: See TracChangeset for help on using the changeset viewer.