From 0fbcd7b1b84ea89bef3d13aaf6d25482c88e78c8 Mon Sep 17 00:00:00 2001 From: alex_t_king Date: Wed, 10 Sep 2003 07:30:08 +0000 Subject: [PATCH] added check for post_status to query that sees which days have posts git-svn-id: http://svn.automattic.com/wordpress/trunk@365 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- b2calendar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2calendar.php b/b2calendar.php index 173f3bfc26..95f997fc64 100644 --- a/b2calendar.php +++ b/b2calendar.php @@ -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) {