File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace BookStack \Sorting ;
4
4
5
+ use voku \helper \ASCII ;
5
6
use BookStack \Entities \Models \Chapter ;
6
7
use BookStack \Entities \Models \Entity ;
7
8
@@ -13,12 +14,12 @@ class SortSetOperationComparisons
13
14
{
14
15
public static function nameAsc (Entity $ a , Entity $ b ): int
15
16
{
16
- return strtolower ($ a ->name ) <=> strtolower ($ b ->name );
17
+ return strtolower (ASCII :: to_transliterate ( $ a ->name )) <=> strtolower (ASCII :: to_transliterate ( $ b ->name ) );
17
18
}
18
19
19
20
public static function nameDesc (Entity $ a , Entity $ b ): int
20
21
{
21
- return strtolower ($ b ->name ) <=> strtolower ($ a ->name );
22
+ return strtolower (ASCII :: to_transliterate ( $ b ->name )) <=> strtolower (ASCII :: to_transliterate ( $ a ->name ) );
22
23
}
23
24
24
25
public static function nameNumericAsc (Entity $ a , Entity $ b ): int
Original file line number Diff line number Diff line change @@ -198,6 +198,8 @@ public function test_name_alphabetical_ordering()
198
198
$ namesToAdd = [
199
199
"Beans " ,
200
200
"bread " ,
201
+ "Éclaire " ,
202
+ "egg " ,
201
203
"Milk " ,
202
204
"pizza " ,
203
205
"Tomato " ,
You can’t perform that action at this time.
0 commit comments