diff options
author | rvelices <rv-github@modusoptimus.com> | 2006-03-08 03:22:25 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2006-03-08 03:22:25 +0000 |
commit | cba56c06ede13f30483ca587f0c79cb0e4d82aaa (patch) | |
tree | 7e82d6628ef115795eb13273cbae7570922ba2ec /include/calendar_monthly.class.php | |
parent | 1e7c9034ded97b32a7d79a1ba05b384028ec5081 (diff) |
calendar: removed some warnings, improved display for weekly style and
worked on css (still not perfect due to IE)
git-svn-id: http://piwigo.org/svn/trunk@1069 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/calendar_monthly.class.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/calendar_monthly.class.php b/include/calendar_monthly.class.php index 2bced250d..9a43b0ecd 100644 --- a/include/calendar_monthly.class.php +++ b/include/calendar_monthly.class.php @@ -139,15 +139,15 @@ function get_date_where($max_levels=3) array_pop($date); } $res = ''; - if (isset($date[CYEAR]) and $date[CYEAR]!='any') + if (isset($date[CYEAR]) and $date[CYEAR]!=='any') { $b = $date[CYEAR] . '-'; $e = $date[CYEAR] . '-'; - if (isset($date[CMONTH]) and $date[CMONTH]!='any') + if (isset($date[CMONTH]) and $date[CMONTH]!=='any') { $b .= $date[CMONTH] . '-'; $e .= $date[CMONTH] . '-'; - if (isset($date[CDAY]) and $date[CDAY]!='any') + if (isset($date[CDAY]) and $date[CDAY]!=='any') { $b .= $date[CDAY]; $e .= $date[CDAY]; @@ -162,11 +162,11 @@ function get_date_where($max_levels=3) { $b .= '01-01'; $e .= '12-31'; - if (isset($date[CMONTH]) and $date[CMONTH]!='any') + if (isset($date[CMONTH]) and $date[CMONTH]!=='any') { $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH]; } - if (isset($date[CDAY]) and $date[CDAY]!='any') + if (isset($date[CDAY]) and $date[CDAY]!=='any') { $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY]; } @@ -176,11 +176,11 @@ function get_date_where($max_levels=3) else { $res = ' AND '.$this->date_field.' IS NOT NULL'; - if (isset($date[CMONTH]) and $date[CMONTH]!='any') + if (isset($date[CMONTH]) and $date[CMONTH]!=='any') { $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH]; } - if (isset($date[CDAY]) and $date[CDAY]!='any') + if (isset($date[CDAY]) and $date[CDAY]!=='any') { $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY]; } @@ -224,7 +224,8 @@ function build_global_calendar() $query.= $this->inner_sql; $query.= $this->get_date_where(); $query.= ' - GROUP BY period'; + GROUP BY period + ORDER BY YEAR('.$this->date_field.') DESC'; $result = pwg_query($query); $items=array(); @@ -290,7 +291,6 @@ function build_year_calendar() $items[$m]['children'][$d] = $row['count']; $items[$m]['nb_images'] += $row['count']; } - //echo ('<pre>'. var_export($items, true) . '</pre>'); if (count($items)==1) { // only one month exists so bail out to month view list($m) = array_keys($items); |