From 609f602104f93370a4d498e4d4fcf9ec9d81ee04 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 12 Feb 2006 08:22:42 +0000 Subject: [PATCH] Category count fix from MichaelH. fixes #2212 git-svn-id: https://develop.svn.wordpress.org/trunk@3520 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index dd87070118..b6eb4bcdfc 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -610,7 +610,6 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) { foreach ($categories as $category) { if ($category->category_parent == $parent) { $category->cat_name = wp_specialchars($category->cat_name); - $count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID"); $pad = str_repeat('— ', $level); if ( current_user_can('manage_categories') ) { $edit = "".__('Edit').""; @@ -627,7 +626,7 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) { $class = ('alternate' == $class) ? '' : 'alternate'; echo "$category->cat_ID$pad $category->cat_name $category->category_description - $count + $category->category_count $edit "; cat_rows($category->cat_ID, $level +1, $categories);