aboutsummaryrefslogtreecommitdiffstats
path: root/include/calendar_monthly.class.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-02-23 16:53:11 +0000
committerplegall <plg@piwigo.org>2006-02-23 16:53:11 +0000
commit9a7a232cef393a829e7e5088ceb5d145c2f942ed (patch)
tree685ec57e3114110a3bcf9db49258cb3aa75b7c98 /include/calendar_monthly.class.php
parent347d2e34b3972ec1d0022b831dd5a1fe13adbaa5 (diff)
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
Diffstat (limited to 'include/calendar_monthly.class.php')
-rw-r--r--include/calendar_monthly.class.php6
1 files changed, 3 insertions, 3 deletions
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;