From 5f61e426dc90b7b697a46da009af2fc88eed3ad0 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 15 Jul 2025 12:39:51 +0200 Subject: Sort by category title, feed title (#7702) * Sort by category name, feed name fix https://github.com/FreshRSS/FreshRSS/issues/7698 Note that sorting is done with the default SQL collation for now, meaning that lower-case vs. upper-case and diacritics are influencing the sorting order. Improvements left for future work. Watch out that those sorting criteria are slower due to additional joins, additional requests, and poorer indexes. * i18n:pl Co-authored-by: Inverle * i18n: nl Co-authored-by: Frans de Jonge * Fix preserve sort --------- Co-authored-by: Inverle Co-authored-by: Frans de Jonge --- app/layout/aside_feed.phtml | 2 +- app/layout/nav_menu.phtml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'app/layout') diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 3d4103731..33c415c6f 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -13,7 +13,7 @@ if (($s = Minz_Request::paramString('state', plaintext: true)) !== '' && ctype_digit($s)) { $state_filter_manual .= '&state=' . $s; } - if (($s = Minz_Request::paramString('sort', plaintext: true)) !== '' && ctype_alpha($s)) { + if (($s = Minz_Request::paramString('sort', plaintext: true)) !== '' && preg_match('/^[a-z.]+$/', $s)) { $state_filter_manual .= '&sort=' . $s; } if (($s = Minz_Request::paramString('order', plaintext: true)) !== '' && ctype_alpha($s)) { diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 944008f04..28f7782df 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -235,6 +235,12 @@ + + + - + + -- cgit v1.2.3