Changeset 4851

Show
Ignore:
Timestamp:
02/01/07 00:34:33 (1 year ago)
Author:
ryan
Message:

XMLRPC API updates.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/xmlrpc.php

    r4833 r4851  
    224224                "wp_slug"               => $page->post_name, 
    225225                "wp_password"           => $page->post_password, 
    226                 "wp_author"             => $author->user_nicename, 
     226                "wp_author"             => $author->display_name, 
    227227                "wp_page_parent_id"     => $page->post_parent, 
    228228                "wp_page_parent_title"  => $parent_title, 
     
    445445            return($this->error); 
    446446        } 
    447  
    448447        // Get basic info on all users. 
    449448        $all_users = $wpdb->get_results(" 
     
    953952 
    954953      $post_author = $user->ID; 
     954 
     955        // If an author id was provided then use it instead. 
     956        if(!empty($content_struct["wp_author_id"])) { 
     957            $post_author = $content_struct["wp_author_id"]; 
     958        } 
    955959 
    956960      $post_title = $content_struct['title']; 
     
    10821086 
    10831087        // Only set the post_author if one is set. 
    1084         if(!empty($content_struct["wp_author"])) { 
    1085             $post_author = $content_struct["wp_author"]; 
     1088        if(!empty($content_struct["wp_author_id"])) { 
     1089            $post_author = $content_struct["wp_author_id"]; 
     1090        } 
     1091 
     1092        // Only set ping_status if it was provided. 
     1093        if(isset($content_struct["mt_allow_pings"])) { 
     1094            switch($content_struct["mt_allow_pings"]) { 
     1095                case "0": 
     1096                    $ping_status = "closed"; 
     1097                    break; 
     1098                case "1": 
     1099                    $ping_status = "open"; 
     1100                    break; 
     1101            } 
    10861102        } 
    10871103 
     
    11111127        get_option('default_comment_status') 
    11121128        : $content_struct['mt_allow_comments']; 
    1113  
    1114       $ping_status = (empty($content_struct['mt_allow_pings'])) ? 
    1115         get_option('default_ping_status') 
    1116         : $content_struct['mt_allow_pings']; 
    11171129 
    11181130      // Do some timestamp voodoo 
     
    11951207          'wp_slug' => $postdata['post_name'], 
    11961208          'wp_password' => $postdata['post_password'], 
    1197           'wp_author' => $author->user_nicename, 
     1209          'wp_author' => $author->display_name, 
    11981210          'wp_author_username'  => $author->user_login 
    11991211        ); 
     
    12401252 
    12411253            // Get the post author info. 
    1242             $author = get_userdata($entry['ID']); 
     1254            $author = get_userdata($entry['post_author']); 
    12431255 
    12441256            $allow_comments = ('open' == $entry['comment_status']) ? 1 : 0; 
     
    12621274                'wp_slug' => $entry['post_name'], 
    12631275                'wp_password' => $entry['post_password'], 
    1264                 'wp_author' => $author->user_nicename, 
     1276                'wp_author' => $author->display_name, 
    12651277                'wp_author_username' => $author->user_login 
    12661278            );