From 1624fd5f631fba10692fc61545edab13f66d2b46 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 19 Feb 2014 20:57:53 +0100 Subject: [PATCH] Tag and user list: a-z order is case insensitive --- src/Models/SearchServices/TagSearchService.php | 2 +- src/Models/SearchServices/UserSearchService.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Models/SearchServices/TagSearchService.php b/src/Models/SearchServices/TagSearchService.php index 0967a2f5..e162d536 100644 --- a/src/Models/SearchServices/TagSearchService.php +++ b/src/Models/SearchServices/TagSearchService.php @@ -73,7 +73,7 @@ class TagSearchService extends AbstractSearchService break; case 'alpha': - $sqlQuery->orderBy('tag.name'); + $sqlQuery->orderBy('tag.name')->collate()->nocase(); break; } diff --git a/src/Models/SearchServices/UserSearchService.php b/src/Models/SearchServices/UserSearchService.php index e5836525..5df6d10f 100644 --- a/src/Models/SearchServices/UserSearchService.php +++ b/src/Models/SearchServices/UserSearchService.php @@ -9,10 +9,10 @@ class UserSearchService extends AbstractSearchService switch ($sortStyle) { case 'alpha,asc': - $sqlQuery->orderBy('name')->asc(); + $sqlQuery->orderBy('name')->collate()->nocase()->asc(); break; case 'alpha,desc': - $sqlQuery->orderBy('name')->desc(); + $sqlQuery->orderBy('name')->collate()->nocase()->desc(); break; case 'date,asc': $sqlQuery->orderBy('join_date')->asc();