From c8378260bc28ba09b62155f997695f0eaa24c5ca Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sun, 8 Jul 2012 08:46:46 -0600 Subject: [PATCH] check for posted dates based on month only --- include/items.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/items.php b/include/items.php index 36a027eec5..e656fc2449 100755 --- a/include/items.php +++ b/include/items.php @@ -3621,7 +3621,9 @@ function posted_dates($uid,$wall) { $dnow = substr($dthen,0,8) . '28'; $ret = array(); - while($dnow >= $dthen) { + // Starting with the current month, get the first and last days of every + // month down to and including the month of the first post + while(substr($dnow, 0, 7) >= substr($dthen, 0, 7)) { $dstart = substr($dnow,0,8) . '01'; $dend = substr($dnow,0,8) . get_dim(intval($dnow),intval(substr($dnow,5))); $start_month = datetime_convert('','',$dstart,'Y-m-d'); -- 2.39.5