Ignore:
Timestamp:
Apr 14, 2006, 3:42:24 AM (18 years ago)
Author:
rvelices
Message:

merge r1162 from branch-1_6 into trunk

fix: calendar prev/next links not working properly when 'any' (All/Tout)
was selected

fix: calendar 'any' (All/Tout) not shown on for the day selection
(last calendar level) - it was meaningless

fix: calendar image ordering is by date descending for large periods (no year
selected) or ascending for small periods (week,month...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_calendar.inc.php

    r1125 r1163  
    260260    else
    261261    {
     262      if ( count($page['chronology_date'])==0
     263           or in_array('any', $page['chronology_date']) )
     264      {// selected period is very big so we show newest first
     265        $order = ' DESC, ';
     266      }
     267      else
     268      {// selected period is small (month,week) so we show oldest first
     269        $order = ' ASC, ';
     270      }
    262271      $order_by = str_replace(
    263272        'ORDER BY ',
    264         'ORDER BY '.$calendar->date_field.' DESC,', $conf['order_by']
     273        'ORDER BY '.$calendar->date_field.$order, $conf['order_by']
    265274        );
    266275      $query .= '
Note: See TracChangeset for help on using the changeset viewer.