A free, self-hostable news aggregator…
Sort labels with locale-aware collation (#9023)
Gerard Alvear Porrase24ac6f21c08
diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.phpindex 55ddb1b8b..d6714d98c 100644--- a/app/Models/TagDAO.php+++ b/app/Models/TagDAO.php@@ -233,7 +233,9 @@ class FreshRSS_TagDAO extends Minz_ModelPdo {$res = $this->fetchAssoc($sql);if ($res !== null) {/** @var list<array{id:int,name:string,unreads:int}> $res */- return self::daoToTags($res);+ $tags = self::daoToTags($res);+ uasort($tags, static fn(FreshRSS_Tag $a, FreshRSS_Tag $b) => FreshRSS_Context::localeCompare($a->name(), $b->name()));+ return $tags;} else {$info = $this->pdo->errorInfo();Minz_Log::error('SQL error ' . __METHOD__ . json_encode($info));