From 9a7a232cef393a829e7e5088ceb5d145c2f942ed Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 23 Feb 2006 16:53:11 +0000 Subject: modification: DAY() MySQL function replaced by DAYOFMONTH() to improve backward compatibility (this function was added in MySQL 4.1) bug fixed: with chronology mode, PWG displays thumbnails on main page if even if no category (which will soon be called "section") is set. This was producing warnings on category.php from include/category_default.inc.php. refactoring: on include/calendar_base.class.php and include/functions_calendar.inc.php. Unix file format, coding guidelines, etc. While trying to understand the code, I've made some presentation modification to clarify variable names and so on. git-svn-id: http://piwigo.org/svn/trunk@1053 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/calendar_monthly.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/calendar_monthly.class.php') diff --git a/include/calendar_monthly.class.php b/include/calendar_monthly.class.php index 3103880c3..128afff87 100644 --- a/include/calendar_monthly.class.php +++ b/include/calendar_monthly.class.php @@ -73,7 +73,7 @@ function generate_category_content($url_base, $view_type, &$requested) if (count($requested)>0) $this->build_nav_bar2($view_type, $requested, 1, 'MONTH', $lang['month']); // month if (count($requested)>1) - $this->build_nav_bar2($view_type, $requested, 2, 'DAY' ); // days + $this->build_nav_bar2($view_type, $requested, 2, 'DAYOFWEEK' ); // days } return false; } @@ -123,7 +123,7 @@ function get_date_where($requested, $max_levels=3) } if (isset($requested[2]) and $requested[2]!='any') { - $res .= ' AND DAY('.$this->date_field.')='.$requested[2]; + $res .= ' AND DAYOFMONTH('.$this->date_field.')='.$requested[2]; } } $res = " AND $this->date_field BETWEEN '$b' AND '$e 23:59:59'" . $res; @@ -137,7 +137,7 @@ function get_date_where($requested, $max_levels=3) } if (isset($requested[2]) and $requested[2]!='any') { - $res .= ' AND DAY('.$this->date_field.')='.$requested[2]; + $res .= ' AND DAYOFMONTH('.$this->date_field.')='.$requested[2]; } } return $res; -- cgit v1.2.3