mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
Compare commits
2 commits
c7ab20e347
...
86e8eb332d
Author | SHA1 | Date | |
---|---|---|---|
|
86e8eb332d | ||
|
9c49a2b86b |
1 changed files with 16 additions and 3 deletions
|
@ -129,10 +129,23 @@ class language_file_helper
|
|||
/**
|
||||
* Sorts the languages by their name instead of iso code
|
||||
*
|
||||
* @return array
|
||||
* @param mixed $a First language data
|
||||
* @param mixed $b Second language data
|
||||
* @return int
|
||||
*/
|
||||
private static function sort_by_local_name($a, $b)
|
||||
private static function sort_by_local_name(mixed $a, mixed $b): int
|
||||
{
|
||||
return $a['local_name'] > $b['local_name'];
|
||||
if ($a['local_name'] > $b['local_name'])
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if ($a['local_name'] < $b['local_name'])
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue