From 8e42e797cccbe44f1b6f7396d8f9607c9e57f9fd Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 25 Mar 2017 15:06:54 +0100 Subject: [PATCH] Opps, cutted this out by accident ... Signed-off-by: Roland Haeder --- mod/photos.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index 8a56497806..32d52c6489 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1243,12 +1243,16 @@ function photos_content(App $a) $prevlink = ''; $nextlink = ''; - /// @todo This query is totally bad, the whole functionality has to be changed - // The query leads to a really intense used index. - // By now we hide it if someone wants to. + /* + * @todo This query is totally bad, the whole functionality has to be changed + * The query leads to a really intense used index. + * By now we hide it if someone wants to. + */ if (!Config::get('system', 'no_count', false)) { $order_field = defaults($_GET, 'order', ''); if ($order_field === 'posted') { + if (!Config::get('system', 'no_count', false)) { + if ($_GET['order'] === 'posted') { $order = 'ASC'; } else { $order = 'DESC';