Fix harcoded table names

git-svn-id: https://develop.svn.wordpress.org/trunk@769 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dougal Campbell 2004-01-12 22:53:11 +00:00
parent 1afc831185
commit 6d54700831
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;