Changeset 5099 for branches/2.0/wp-admin/admin-db.php
- Timestamp:
- 03/25/2007 11:06:28 PM (19 years ago)
- File:
-
- 1 edited
-
branches/2.0/wp-admin/admin-db.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-admin/admin-db.php
r4365 r5099 111 111 if (!$update) { 112 112 $wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$category_parent')"); 113 $cat_ID = $wpdb->insert_id;113 $cat_ID = (int) $wpdb->insert_id; 114 114 } else { 115 115 $wpdb->query ("UPDATE $wpdb->categories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = '$category_parent' WHERE cat_ID = '$cat_ID'"); … … 208 208 return 0; 209 209 210 return $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'");210 return (int) $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'"); 211 211 } 212 212 … … 270 270 if ( !empty($link_id) ) 271 271 $update = true; 272 273 $link_id = (int) $link_id; 272 274 273 275 if( trim( $link_name ) == '' ) … … 327 329 } else { 328 330 $wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_category, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES('$link_url','$link_name', '$link_image', '$link_target', '$link_category', '$link_description', '$link_visible', '$link_owner', '$link_rating', '$link_rel', '$link_notes', '$link_rss')"); 329 $link_id = $wpdb->insert_id;331 $link_id = (int) $wpdb->insert_id; 330 332 } 331 333
Note: See TracChangeset
for help on using the changeset viewer.