Only used published posts.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c9ad4c9437
commit
812ad5dbc3
|
@ -299,7 +299,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
||||||
FROM $tablecategories
|
FROM $tablecategories
|
||||||
INNER JOIN $tablepost2cat ON (cat_ID = category_id)
|
INNER JOIN $tablepost2cat ON (cat_ID = category_id)
|
||||||
INNER JOIN $tableposts ON (ID = post_id)
|
INNER JOIN $tableposts ON (ID = post_id)
|
||||||
WHERE 1 = 1 $exclusions
|
WHERE post_status = 'publish' $exclusions
|
||||||
GROUP BY category_id");
|
GROUP BY category_id");
|
||||||
foreach ($cat_counts as $cat_count) {
|
foreach ($cat_counts as $cat_count) {
|
||||||
$category_posts["$cat_count->cat_ID"] = $cat_count->cat_count;
|
$category_posts["$cat_count->cat_ID"] = $cat_count->cat_count;
|
||||||
|
@ -312,7 +312,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
||||||
FROM $tablecategories
|
FROM $tablecategories
|
||||||
LEFT JOIN $tablepost2cat ON (cat_ID = category_id)
|
LEFT JOIN $tablepost2cat ON (cat_ID = category_id)
|
||||||
LEFT JOIN $tableposts ON (ID = post_id)
|
LEFT JOIN $tableposts ON (ID = post_id)
|
||||||
WHERE 1 = 1 $exclusions
|
WHERE post_status = 'publish' $exclusions
|
||||||
GROUP BY category_id");
|
GROUP BY category_id");
|
||||||
foreach ($cat_dates as $cat_date) {
|
foreach ($cat_dates as $cat_date) {
|
||||||
$category_lastday["$cat_date->cat_ID"] = $cat_date->lastday;
|
$category_lastday["$cat_date->cat_ID"] = $cat_date->lastday;
|
||||||
|
|
Loading…
Reference in New Issue