mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 11:10:57 +01:00
sort repository list case insensitive. also use the more appropriate ksort function as we do not want to sort by key value
This commit is contained in:
@@ -28,7 +28,8 @@ class Client extends BaseClient
|
|||||||
* Searches for valid repositories on the specified path
|
* Searches for valid repositories on the specified path
|
||||||
*
|
*
|
||||||
* @param array $paths Array of paths where repositories will be searched
|
* @param array $paths Array of paths where repositories will be searched
|
||||||
* @return array Found repositories, containing their name, path and description
|
* @return array Found repositories, containing their name, path and description sorted
|
||||||
|
* by repository name
|
||||||
*/
|
*/
|
||||||
public function getRepositories($paths)
|
public function getRepositories($paths)
|
||||||
{
|
{
|
||||||
@@ -45,7 +46,7 @@ class Client extends BaseClient
|
|||||||
}
|
}
|
||||||
|
|
||||||
$allRepositories = array_unique($allRepositories, SORT_REGULAR);
|
$allRepositories = array_unique($allRepositories, SORT_REGULAR);
|
||||||
asort($allRepositories);
|
ksort($allRepositories, SORT_STRING | SORT_FLAG_CASE);
|
||||||
|
|
||||||
return $allRepositories;
|
return $allRepositories;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user