fix for the bug that made list_cats show empty categories, thanks to brux
git-svn-id: https://develop.svn.wordpress.org/trunk@1278 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1138540453
commit
7b9518dbed
|
@ -297,8 +297,8 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
||||||
$cat_counts = $wpdb->get_results(" SELECT cat_ID,
|
$cat_counts = $wpdb->get_results(" SELECT cat_ID,
|
||||||
COUNT($tablepost2cat.post_id) AS cat_count
|
COUNT($tablepost2cat.post_id) AS cat_count
|
||||||
FROM $tablecategories
|
FROM $tablecategories
|
||||||
LEFT JOIN $tablepost2cat ON (cat_ID = category_id)
|
INNER JOIN $tablepost2cat ON (cat_ID = category_id)
|
||||||
LEFT JOIN $tableposts ON (ID = post_id)
|
INNER JOIN $tableposts ON (ID = post_id)
|
||||||
WHERE 1 = 1 $exclusions
|
WHERE 1 = 1 $exclusions
|
||||||
GROUP BY category_id");
|
GROUP BY category_id");
|
||||||
foreach ($cat_counts as $cat_count) {
|
foreach ($cat_counts as $cat_count) {
|
||||||
|
|
Loading…
Reference in New Issue