added check for post_status to query that sees which days have posts

git-svn-id: https://develop.svn.wordpress.org/trunk@365 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Alex King 2003-09-10 07:30:08 +00:00
parent 3a2ec40b19
commit d3e0e2b123

View File

@ -127,7 +127,7 @@ $end_of_week = (($start_of_week + 7) % 7);
$calendarmonthwithpost = 0;
while($calendarmonthwithpost == 0) {
$arc_sql="SELECT DISTINCT YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) AS dom FROM $tableposts WHERE MONTH(post_date) = '$thismonth' AND YEAR(post_date) = '$thisyear' ORDER BY post_date DESC";
$arc_sql="SELECT DISTINCT YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) AS dom FROM $tableposts WHERE MONTH(post_date) = '$thismonth' AND YEAR(post_date) = '$thisyear' AND post_status = 'publish' ORDER BY post_date DESC";
$querycount++;
$arc_results = $wpdb->get_results($arc_sql);
if ($wpdb->num_rows > 0) {