X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/dca14feaaad686bfbe9acb59f5eb11b815501e5b..865e5aecc99ebb8051f7b1c99b11710bd9709383:/app/Sorting/SortSetOperationComparisons.php diff --git a/app/Sorting/SortSetOperationComparisons.php b/app/Sorting/SortSetOperationComparisons.php index 0d8e58264..cb20e1860 100644 --- a/app/Sorting/SortSetOperationComparisons.php +++ b/app/Sorting/SortSetOperationComparisons.php @@ -2,6 +2,7 @@ namespace BookStack\Sorting; +use voku\helper\ASCII; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Entity; @@ -13,12 +14,12 @@ class SortSetOperationComparisons { public static function nameAsc(Entity $a, Entity $b): int { - return $a->name <=> $b->name; + return strtolower(ASCII::to_transliterate($a->name, null)) <=> strtolower(ASCII::to_transliterate($b->name, null)); } public static function nameDesc(Entity $a, Entity $b): int { - return $b->name <=> $a->name; + return strtolower(ASCII::to_transliterate($b->name, null)) <=> strtolower(ASCII::to_transliterate($a->name, null)); } public static function nameNumericAsc(Entity $a, Entity $b): int