Changeset 4032 for branches/2.0/wp-admin/admin-db.php
- Timestamp:
- 07/23/2006 06:27:00 PM (20 years ago)
- File:
-
- 1 edited
-
branches/2.0/wp-admin/admin-db.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-admin/admin-db.php
r3802 r4032 157 157 158 158 // Don't delete the default cat. 159 if ( 1 == $cat_ID)159 if ($cat_ID == get_option('default_category')) 160 160 return 0; 161 161 … … 171 171 172 172 // TODO: Only set categories to general if they're not in another category already 173 $wpdb->query("UPDATE $wpdb->post2cat SET category_id='1' WHERE category_id='$cat_ID'"); 173 $default_cat = get_option('default_category'); 174 $wpdb->query("UPDATE $wpdb->post2cat SET category_id='$default_cat' WHERE category_id='$cat_ID'"); 174 175 175 176 wp_cache_delete($cat_ID, 'category');
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)