diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-07-05 00:25:11 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-07-05 00:25:11 +0000 |
commit | dc40995cadbe16399dcbdfdb46c745f4cbccb226 (patch) | |
tree | 6c0c780a03a513e59004e083b28ba2b90faf5532 /include | |
parent | 0499c2ccc5486f5879ccffcb5851833f5c0b88c1 (diff) |
- recent pics are sorted by date descending, and only then by conf['order_by']
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2423 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/section_init.inc.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php index e2ccacd88..8a54bd864 100644 --- a/include/section_init.inc.php +++ b/include/section_init.inc.php @@ -394,6 +394,15 @@ SELECT image_id // +-----------------------------------------------------------------------+ else if ($page['section'] == 'recent_pics') { + if ( !isset($page['super_order_by']) ) + { + $conf['order_by'] = str_replace( + 'ORDER BY ', + 'ORDER BY date_available DESC,', + $conf['order_by'] + ); + } + $query = ' SELECT DISTINCT(id) FROM '.IMAGES_TABLE.' |