From 08dbabb3f2c744364c0657bbe1fb4fc9d87d3136 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 23 Aug 2022 09:59:56 +0000 Subject: [PATCH] Sort day folder by date taken --- lib/Db/TimelineQuery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Db/TimelineQuery.php b/lib/Db/TimelineQuery.php index a496f9f0..8342b512 100644 --- a/lib/Db/TimelineQuery.php +++ b/lib/Db/TimelineQuery.php @@ -124,7 +124,8 @@ class TimelineQuery { INNER JOIN `*PREFIX*filecache` ON `*PREFIX*filecache`.`fileid` = `*PREFIX*memories`.`fileid` AND (`*PREFIX*filecache`.`parent`=? OR `*PREFIX*filecache`.`fileid`=?) - WHERE `*PREFIX*memories`.`dayid`=?'; + WHERE `*PREFIX*memories`.`dayid`=? + ORDER BY `*PREFIX*memories`.`datetaken` DESC'; $rows = $this->connection->executeQuery($sql, [$folderId, $folderId, $dayId], [ \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, ])->fetchAll();