From 8a2631ffffb50a65358b2844e27830465ff55b14 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sun, 16 Oct 2022 16:46:37 -0700 Subject: [PATCH] Break ties in face/tag --- lib/Db/TimelineQueryFaces.php | 1 + lib/Db/TimelineQueryTags.php | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/Db/TimelineQueryFaces.php b/lib/Db/TimelineQueryFaces.php index 79242c5c..12e10079 100644 --- a/lib/Db/TimelineQueryFaces.php +++ b/lib/Db/TimelineQueryFaces.php @@ -57,6 +57,7 @@ trait TimelineQueryFaces { // ORDER by number of faces in cluster $query->orderBy('count', 'DESC'); + $query->addOrderBy('rfc.id'); // tie-breaker // FETCH all faces $faces = $query->executeQuery()->fetchAll(); diff --git a/lib/Db/TimelineQueryTags.php b/lib/Db/TimelineQueryTags.php index 278bde8b..c60a9024 100644 --- a/lib/Db/TimelineQueryTags.php +++ b/lib/Db/TimelineQueryTags.php @@ -56,6 +56,7 @@ trait TimelineQueryTags { // GROUP and ORDER by tag name $query->groupBy('st.name'); $query->orderBy('st.name', 'ASC'); + $query->addOrderBy('st.id'); // tie-breaker // FETCH all tags $tags = $query->executeQuery()->fetchAll();