Changeset 4851 for trunk/xmlrpc.php
- Timestamp:
- 02/01/2007 12:34:33 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r4833 r4851 224 224 "wp_slug" => $page->post_name, 225 225 "wp_password" => $page->post_password, 226 "wp_author" => $author-> user_nicename,226 "wp_author" => $author->display_name, 227 227 "wp_page_parent_id" => $page->post_parent, 228 228 "wp_page_parent_title" => $parent_title, … … 445 445 return($this->error); 446 446 } 447 448 447 // Get basic info on all users. 449 448 $all_users = $wpdb->get_results(" … … 953 952 954 953 $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 } 955 959 956 960 $post_title = $content_struct['title']; … … 1082 1086 1083 1087 // 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 } 1086 1102 } 1087 1103 … … 1111 1127 get_option('default_comment_status') 1112 1128 : $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'];1117 1129 1118 1130 // Do some timestamp voodoo … … 1195 1207 'wp_slug' => $postdata['post_name'], 1196 1208 'wp_password' => $postdata['post_password'], 1197 'wp_author' => $author-> user_nicename,1209 'wp_author' => $author->display_name, 1198 1210 'wp_author_username' => $author->user_login 1199 1211 ); … … 1240 1252 1241 1253 // Get the post author info. 1242 $author = get_userdata($entry[' ID']);1254 $author = get_userdata($entry['post_author']); 1243 1255 1244 1256 $allow_comments = ('open' == $entry['comment_status']) ? 1 : 0; … … 1262 1274 'wp_slug' => $entry['post_name'], 1263 1275 'wp_password' => $entry['post_password'], 1264 'wp_author' => $author-> user_nicename,1276 'wp_author' => $author->display_name, 1265 1277 'wp_author_username' => $author->user_login 1266 1278 );
Note: See TracChangeset
for help on using the changeset viewer.