Changeset 5086 for trunk/wp-includes/post.php
- Timestamp:
- 03/22/2007 11:03:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r5082 r5086 461 461 462 462 // Set the limit clause, if we got a limit 463 $num = (int) $num; 463 464 if ($num) { 464 465 $limit = "LIMIT $num"; … … 771 772 function wp_set_post_categories($post_ID = 0, $post_categories = array()) { 772 773 global $wpdb; 774 775 $post_ID = (int) $post_ID; 773 776 // If $post_categories isn't already an array, make it one: 774 777 if (!is_array($post_categories) || 0 == count($post_categories) || empty($post_categories)) … … 781 784 SELECT category_id 782 785 FROM $wpdb->post2cat 783 WHERE post_id = $post_ID");786 WHERE post_id = '$post_ID'"); 784 787 785 788 if (!$old_categories) { … … 796 799 $wpdb->query(" 797 800 DELETE FROM $wpdb->post2cat 798 WHERE category_id = $del799 AND post_id = $post_ID801 WHERE category_id = '$del' 802 AND post_id = '$post_ID' 800 803 "); 801 804 }
Note: See TracChangeset
for help on using the changeset viewer.