From 48346192297f2bf4c446f89ab65f915f80b1c75d Mon Sep 17 00:00:00 2001 From: emc3 Date: Mon, 12 Jan 2004 22:53:11 +0000 Subject: [PATCH] Fix harcoded table names git-svn-id: http://svn.automattic.com/wordpress/trunk@769 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 99d38c3d6..e9935df6a 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -1506,9 +1506,9 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde if (intval($hide_empty) == 1) { $cat_counts = $wpdb->get_results(" SELECT cat_ID, - COUNT(wp_post2cat.post_id) AS cat_count - FROM wp_categories LEFT JOIN wp_post2cat ON (cat_ID = category_id) - LEFT JOIN wp_posts ON (ID = post_id) + COUNT($tablepost2cat.post_id) AS cat_count + FROM $tablecategories LEFT JOIN $tablepost2cat ON (cat_ID = category_id) + LEFT JOIN $tableposts ON (ID = post_id) GROUP BY category_id"); foreach ($cat_counts as $cat_count) { $category_posts["$cat_count->cat_ID"] = $cat_count->cat_count;