[Comoblog-commit] comoblog/modules/mod_calendar mod_calendar.php,1.6,1.7
Status: Inactive
Brought to you by:
markwallis
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2006-01-09 02:53:04
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4621 Modified Files: mod_calendar.php Log Message: Fix issue with mod_calendar showing posts available on incorrect days due to post editing Index: mod_calendar.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/mod_calendar.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mod_calendar.php 8 Oct 2005 13:27:41 -0000 1.6 +++ mod_calendar.php 9 Jan 2006 02:52:56 -0000 1.7 @@ -117,9 +117,9 @@ // Find prev day with posts $currenttime = mktime(23,59,59,$current_date['mon'],$current_date['mday'] - 1,$current_date['year']); $query = " - select post_added + select post_mail_date from ".CFG_MYSQL_TABPREFIX."posts - where post_added <= '".$currenttime."' order by post_added desc limit 1"; + where post_mail_date <= '".$currenttime."' order by post_mail_date desc limit 1"; $res = mysql_query($query); if ($row = mysql_fetch_row($res)) { @@ -131,9 +131,9 @@ // Find next day with posts $currenttime = mktime(0,0,0,$current_date['mon'],$current_date['mday']+1,$current_date['year']); $query = " - select post_added + select post_mail_date from ".CFG_MYSQL_TABPREFIX."posts - where post_added >= '".$currenttime."' order by post_added limit 1"; + where post_mail_date >= '".$currenttime."' order by post_mail_date limit 1"; $res = mysql_query($query); if ($row = mysql_fetch_row($res)) { @@ -228,10 +228,10 @@ if ($start_day == 7) $start_day = 0; // posts in days of month $query = " - select post_added + select post_mail_date from ".CFG_MYSQL_TABPREFIX."posts - where post_added > '".mktime(0,0,0,$current_date['mon'],1,$current_date['year'])."' - and post_added <= '".mktime(23,59,59,$current_date['mon'],$days_in_month,$current_date['year'])."' + where post_mail_date > '".mktime(0,0,0,$current_date['mon'],1,$current_date['year'])."' + and post_mail_date <= '".mktime(23,59,59,$current_date['mon'],$days_in_month,$current_date['year'])."' "; $res = mysql_query($query); |