Changeset 5090
- Timestamp:
- 03/23/2007 02:16:16 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-db.php
r5087 r5090 246 246 return 0; 247 247 248 return $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'");248 return (int) $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'"); 249 249 } 250 250 … … 299 299 if ( !empty($link_id) ) 300 300 $update = true; 301 302 $link_id = (int) $link_id; 301 303 302 304 if( trim( $link_name ) == '' ) … … 444 446 SELECT category_id 445 447 FROM $wpdb->link2cat 446 WHERE link_id = $link_ID");448 WHERE link_id = '$link_ID'"); 447 449 448 450 if (!$old_categories) { … … 457 459 if ($delete_cats) { 458 460 foreach ($delete_cats as $del) { 461 $del = (int) $del; 459 462 $wpdb->query(" 460 463 DELETE FROM $wpdb->link2cat 461 WHERE category_id = $del462 AND link_id = $link_ID464 WHERE category_id = '$del' 465 AND link_id = '$link_ID' 463 466 "); 464 467 } -
trunk/wp-includes/bookmark-template.php
r5087 r5090 166 166 return ''; 167 167 168 $cat_id = (int) 169 $cats[0]; // Take the first cat. 168 $cat_id = (int) $cats[0]; // Take the first cat. 170 169 171 170 $cat = get_category($cat_id); -
trunk/wp-includes/category-template.php
r5087 r5090 65 65 $id = (int) $id; 66 66 if ( !$id ) 67 $id = (int) 68 $post->ID; 67 $id = (int) $post->ID; 69 68 70 69 if ( !isset($category_cache[$blog_id][$id]) ) -
trunk/wp-includes/post.php
r5087 r5090 644 644 VALUES 645 645 ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')"); 646 $post_ID = $wpdb->insert_id;646 $post_ID = (int) $wpdb->insert_id; 647 647 } 648 648 … … 1352 1352 VALUES 1353 1353 ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type', '$guid')"); 1354 $post_ID = $wpdb->insert_id;1354 $post_ID = (int) $wpdb->insert_id; 1355 1355 } 1356 1356
Note: See TracChangeset
for help on using the changeset viewer.