From e316add4ea2beaba90cc0690a40b4b3552cb9da3 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 12 Feb 2006 08:22:42 +0000 Subject: [PATCH] Category count fix from MichaelH. fixes #2212 git-svn-id: http://svn.automattic.com/wordpress/trunk@3520 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 dd8707011..b6eb4bcdf 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);