mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-16 16:19:09 +08:00
Sort Rules: Updated name comparison to not ignore non-ascii chars
Related to #5550 and #5542
This commit is contained in:
parent
abe7467ae5
commit
1ba0d26fdd
@ -14,12 +14,12 @@ class SortSetOperationComparisons
|
||||
{
|
||||
public static function nameAsc(Entity $a, Entity $b): int
|
||||
{
|
||||
return strtolower(ASCII::to_transliterate($a->name)) <=> strtolower(ASCII::to_transliterate($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 strtolower(ASCII::to_transliterate($b->name)) <=> strtolower(ASCII::to_transliterate($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
|
||||
|
@ -200,6 +200,8 @@ class SortRuleTest extends TestCase
|
||||
"bread",
|
||||
"Éclaire",
|
||||
"egg",
|
||||
"É😀ire",
|
||||
"É🫠ire",
|
||||
"Milk",
|
||||
"pizza",
|
||||
"Tomato",
|
||||
|
Loading…
x
Reference in New Issue
Block a user