Ignore:
Timestamp:
Mar 8, 2006, 4:22:25 AM (18 years ago)
Author:
rvelices
Message:

calendar: removed some warnings, improved display for weekly style and
worked on css (still not perfect due to IE)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/calendar_monthly.class.php

    r1063 r1069  
    140140  }
    141141  $res = '';
    142   if (isset($date[CYEAR]) and $date[CYEAR]!='any')
     142  if (isset($date[CYEAR]) and $date[CYEAR]!=='any')
    143143  {
    144144    $b = $date[CYEAR] . '-';
    145145    $e = $date[CYEAR] . '-';
    146     if (isset($date[CMONTH]) and $date[CMONTH]!='any')
     146    if (isset($date[CMONTH]) and $date[CMONTH]!=='any')
    147147    {
    148148      $b .= $date[CMONTH] . '-';
    149149      $e .= $date[CMONTH] . '-';
    150       if (isset($date[CDAY]) and $date[CDAY]!='any')
     150      if (isset($date[CDAY]) and $date[CDAY]!=='any')
    151151      {
    152152        $b .= $date[CDAY];
     
    163163      $b .= '01-01';
    164164      $e .= '12-31';
    165       if (isset($date[CMONTH]) and $date[CMONTH]!='any')
     165      if (isset($date[CMONTH]) and $date[CMONTH]!=='any')
    166166      {
    167167        $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];
    168168      }
    169       if (isset($date[CDAY]) and $date[CDAY]!='any')
     169      if (isset($date[CDAY]) and $date[CDAY]!=='any')
    170170      {
    171171        $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];
     
    177177  {
    178178    $res = ' AND '.$this->date_field.' IS NOT NULL';
    179     if (isset($date[CMONTH]) and $date[CMONTH]!='any')
     179    if (isset($date[CMONTH]) and $date[CMONTH]!=='any')
    180180    {
    181181      $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];
    182182    }
    183     if (isset($date[CDAY]) and $date[CDAY]!='any')
     183    if (isset($date[CDAY]) and $date[CDAY]!=='any')
    184184    {
    185185      $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];
     
    225225  $query.= $this->get_date_where();
    226226  $query.= '
    227   GROUP BY period';
     227  GROUP BY period
     228  ORDER BY YEAR('.$this->date_field.') DESC';
    228229
    229230  $result = pwg_query($query);
     
    291292    $items[$m]['nb_images'] += $row['count'];
    292293  }
    293   //echo ('<pre>'. var_export($items, true) . '</pre>');
    294294  if (count($items)==1)
    295295  { // only one month exists so bail out to month view
Note: See TracChangeset for help on using the changeset viewer.