From aba4d40fb0bece5c7aeba835948be07d22fd7f86 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Thu, 12 Jun 2003 22:45:27 +0000 Subject: [PATCH] Use defined beginning of week. git-svn-id: https://develop.svn.wordpress.org/trunk@217 602fd350-edb4-49c9-b593-d223f7449a82 --- b2-include/b2template.functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2-include/b2template.functions.php b/b2-include/b2template.functions.php index e3b0865c08..6bc39ac598 100644 --- a/b2-include/b2template.functions.php +++ b/b2-include/b2template.functions.php @@ -169,7 +169,7 @@ function get_archives($type='', $limit='') { $start_of_week = 1; } ++$querycount; - $arcresults = $wpdb->get_results("SELECT DISTINCT WEEK(post_date) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd FROM $tableposts WHERE post_date < '$now' AND post_category > 0 AND post_status = 'publish' ORDER BY post_date DESC" . $limit); + $arcresults = $wpdb->get_results("SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd FROM $tableposts WHERE post_date < '$now' AND post_category > 0 AND post_status = 'publish' ORDER BY post_date DESC" . $limit); $arc_w_last = ''; foreach ($arcresults as $arcresult) { if ($arcresult->week != $arc_w_last) {