Ignore:
Timestamp:
Feb 8, 2014, 12:11:14 PM (10 years ago)
Author:
mistic100
Message:

allow to choose the sort order when using limit filter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/SmartAlbums/include/functions.inc.php

    r26442 r27266  
    438438      {
    439439        $limit = '0, '.$filter['value'];
     440        if (!empty($filter['cond'])) $order_by = $filter['cond'];
    440441        break;
    441442      }
     
    469470  $MainQuery.= '
    470471  GROUP BY i.id
    471   '.$conf['order_by'].'
     472  '.(isset($order_by) ? "ORDER BY ".$order_by : $conf['order_by']).'
    472473  '.(isset($limit) ? "LIMIT ".$limit : null).'
    473474;';
     
    622623      else
    623624      {
    624         $filter['cond'] = 'limit';
    625625        $limit_is_set = true;
    626626      }
Note: See TracChangeset for help on using the changeset viewer.