aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/section_init.inc.php9
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.'