Changeset 5031
- Timestamp:
- 03/12/07 21:28:43 (1 year ago)
- Files:
-
- branches/2.0/wp-includes/functions-post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.0/wp-includes/functions-post.php
r4602 r5031 513 513 if ($add_cats) { 514 514 foreach ($add_cats as $new_cat) { 515 $wpdb->query(" 516 INSERT INTO $wpdb->post2cat (post_id, category_id) 517 VALUES ($post_ID, $new_cat)"); 518 } 519 } 520 515 $new_cat = (int) $new_cat; 516 if ( !empty($new_cat) ) 517 $wpdb->query(" 518 INSERT INTO $wpdb->post2cat (post_id, category_id) 519 VALUES ('$post_ID', '$new_cat')"); 520 } 521 } 522 521 523 // Update category counts. 522 524 $all_affected_cats = array_unique(array_merge($post_categories, $old_categories));
