From 2f159d0949a2392df3cb84b9080e71bcc75ca304 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 18 Oct 2022 08:02:56 -0700 Subject: [PATCH] faces: place unnamed clusters at the end (fix #76) --- lib/Db/TimelineQueryFaces.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Db/TimelineQueryFaces.php b/lib/Db/TimelineQueryFaces.php index 850fdb6b..3683b208 100644 --- a/lib/Db/TimelineQueryFaces.php +++ b/lib/Db/TimelineQueryFaces.php @@ -56,7 +56,8 @@ trait TimelineQueryFaces { $query->groupBy('rfc.id'); // ORDER by number of faces in cluster - $query->orderBy('count', 'DESC'); + $query->orderBy($query->createFunction("rfc.title <> ''"), 'DESC'); + $query->addOrderBy('count', 'DESC'); $query->addOrderBy('rfc.id'); // tie-breaker // FETCH all faces