From dc40995cadbe16399dcbdfdb46c745f4cbccb226 Mon Sep 17 00:00:00 2001 From: rvelices Date: Sat, 5 Jul 2008 00:25:11 +0000 Subject: - 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 --- include/section_init.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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.' -- cgit v1.2.3