A few CSS polishes

git-svn-id: https://develop.svn.wordpress.org/trunk@2730 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2005-07-23 06:22:48 +00:00
parent cf204d01e5
commit b81fef690d
6 changed files with 123 additions and 112 deletions
+8
View File
@@ -266,6 +266,14 @@ function upgrade_160() {
foreach ( $old_user_fields as $old )
$wpdb->query("ALTER TABLE $wpdb->users DROP $old");
$wpdb->show_errors();
if ( 0 == $wpdb->get_var("SELECT SUM(category_count) FROM $wpdb->categories") ) { // Create counts
$categories = $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories");
foreach ( $categories as $cat_id ) {
$count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->post2cat WHERE category_id = '$cat_id'");
$wpdb->query("UPDATE $wpdb->categories SET category_count = '$count' WHERE cat_ID = '$cat_id'");
}
}
}
// The functions we use to actually do stuff