Changeset 4814 for trunk/xmlrpc.php
- Timestamp:
- 01/26/2007 08:05:53 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r4807 r4814 23 23 <homePageLink><?php bloginfo_rss('url') ?></homePageLink> 24 24 <apis> 25 <api name="WordPress" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" /> 25 26 <api name="Movable Type" blogID="1" preferred="true" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" /> 26 27 <api name="MetaWeblog" blogID="1" preferred="false" apiLink="<?php bloginfo_rss('url') ?>/xmlrpc.php" /> … … 184 185 $link = post_permalink($page->ID); 185 186 187 // Get info the page parent if there is one. 188 $parent_title = ""; 189 if(!empty($page->post_parent)) { 190 $parent = get_page($page->post_parent); 191 $parent_title = $parent->post_title; 192 } 193 186 194 // Determine comment and ping settings. 187 195 $allow_comments = ("open" == $page->comment_status) ? 1 : 0; … … 197 205 } 198 206 199 // Get the users nicename.200 $ nicename = get_profile("user_nicename", $username);207 // Get the author info. 208 $author = get_userdata($page->post_author); 201 209 202 210 $page_struct = array( 203 "dateCreated" => new IXR_Date($page_date), 204 "userid" => $page->post_author, 205 "page_id" => $page->ID, 206 "page_status" => $page->post_status, 207 "description" => $full_page["main"], 208 "title" => $page->post_title, 209 "link" => $link, 210 "permaLink" => $link, 211 "categories" => $categories, 212 "excerpt" => $page->post_excerpt, 213 "text_more" => $full_page["extended"], 214 "mt_allow_comments" => $allow_comments, 215 "mt_allow_pings" => $allow_pings, 216 "wp_slug" => $page->post_name, 217 "wp_password" => $page->post_password, 218 "wp_author" => $nicename, 219 "wp_page_parent_id" => $page->post_parent, 220 "wp_page_order" => $page->menu_order 211 "dateCreated" => new IXR_Date($page_date), 212 "userid" => $page->post_author, 213 "page_id" => $page->ID, 214 "page_status" => $page->post_status, 215 "description" => $full_page["main"], 216 "title" => $page->post_title, 217 "link" => $link, 218 "permaLink" => $link, 219 "categories" => $categories, 220 "excerpt" => $page->post_excerpt, 221 "text_more" => $full_page["extended"], 222 "mt_allow_comments" => $allow_comments, 223 "mt_allow_pings" => $allow_pings, 224 "wp_slug" => $page->post_name, 225 "wp_password" => $page->post_password, 226 "wp_author" => $author->user_nicename, 227 "wp_page_parent_id" => $page->post_parent, 228 "wp_page_parent_title" => $parent_title, 229 "wp_page_order" => $page->menu_order, 230 "wp_author_username" => $author->user_login 221 231 ); 222 232 … … 409 419 $page_list = $wpdb->get_results(" 410 420 SELECT ID page_id, 411 post_title page_title 421 post_title page_title, 422 post_parent page_parent_id 412 423 FROM {$wpdb->posts} 413 424 WHERE post_type = 'page' … … 1155 1166 $post = get_extended($postdata['post_content']); 1156 1167 $link = post_permalink($postdata['ID']); 1168 1169 // Get the author info. 1170 $author = get_userdata($postdata['post_author']); 1157 1171 1158 1172 $allow_comments = ('open' == $postdata['comment_status']) ? 1 : 0; … … 1173 1187 'mt_text_more' => $post['extended'], 1174 1188 'mt_allow_comments' => $allow_comments, 1175 'mt_allow_pings' => $allow_pings 1189 'mt_allow_pings' => $allow_pings, 1190 'wp_slug' => $postdata['post_name'], 1191 'wp_password' => $postdata['post_password'], 1192 'wp_author' => $author->user_nicename, 1193 'wp_author_username' => $author->user_login 1176 1194 ); 1177 1195 … … 1265 1283 1266 1284 // FIXME: can we avoid using direct SQL there? 1267 if ($cats = $wpdb->get_results("SELECT cat_ID,cat_name FROM $wpdb->categories", ARRAY_A)) {1285 if ($cats = $wpdb->get_results("SELECT cat_ID,cat_name,category_parent FROM $wpdb->categories", ARRAY_A)) { 1268 1286 foreach ($cats as $cat) { 1269 1287 $struct['categoryId'] = $cat['cat_ID']; 1288 $struct['parentId'] = $cat['category_parent']; 1270 1289 $struct['description'] = $cat['cat_name']; 1271 1290 $struct['categoryName'] = $cat['cat_name'];
Note: See TracChangeset
for help on using the changeset viewer.