Changeset 2690
- Timestamp:
- 07/03/2005 01:03:13 AM (19 years ago)
- Location:
- branches/1.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/wp-includes/functions-post.php
r2681 r2690 104 104 105 105 // First get all of the original fields 106 extract(wp_get_single_post($postarr['ID'], ARRAY_A)); 107 108 // Now overwrite any changed values being passed in 106 $post = wp_get_single_post($postarr['ID'], ARRAY_A); 107 108 // Escape data pulled from DB. 109 $post = add_magic_quotes($post); 110 extract($post); 111 112 // Now overwrite any changed values being passed in. These are 113 // already escaped. 109 114 extract($postarr); 110 115 111 // Make sure we set a valid category116 // If no categories were passed along, use the current cats. 112 117 if ( 0 == count($post_category) || !is_array($post_category) ) 113 $post_category = array(get_option('default_category'));118 $post_category = $post['post_category']; 114 119 115 120 $post_modified = current_time('mysql'); … … 150 155 $result = $wpdb->get_col($sql); 151 156 157 if ( !$result ) 158 $result = array(); 159 152 160 return array_unique($result); 153 161 } … … 156 164 global $wpdb; 157 165 // If $post_categories isn't already an array, make it one: 158 if (!is_array($post_categories)) { 159 if (!$post_categories) { 160 $post_categories = get_option('default_category'); 161 } 162 $post_categories = array($post_categories); 163 } 166 if (!is_array($post_categories) || 0 == count($post_categories)) 167 $post_categories = array(get_option('default_category')); 164 168 165 169 $post_categories = array_unique($post_categories); -
branches/1.5/xmlrpc.php
r2679 r2690 563 563 $post_category[] = get_cat_ID($cat); 564 564 } 565 } else if ( !empty($catnames) ) { 566 $post_category = array(get_cat_ID($catnames)); 567 } 565 } 568 566 569 567 // We've got all the data -- post it: … … 621 619 $post_category[] = get_cat_ID($cat); 622 620 } 623 } else if ( !empty($catnames) ) { 624 $post_category = array(get_cat_ID($catnames)); 625 } 621 } 626 622 627 623 $post_excerpt = $content_struct['mt_excerpt'];
Note: See TracChangeset
for help on using the changeset viewer.