Fix harcoded table names

git-svn-id: http://svn.automattic.com/wordpress/trunk@769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
emc3 2004-01-12 22:53:11 +00:00
parent 41cbf6df25
commit 4834619229
1 changed files with 3 additions and 3 deletions

View File

@ -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;