sorting enabled and disabled apps alphabetically - fixes #13404
This commit is contained in:
parent
a65f666834
commit
d3cd2b3e0f
1 changed files with 16 additions and 0 deletions
|
@ -97,6 +97,14 @@ class AppSettingsController extends Controller {
|
|||
$apps = array_filter($apps, function ($app) {
|
||||
return $app['active'];
|
||||
});
|
||||
usort($apps, function ($a, $b) {
|
||||
$a = (string)$a['name'];
|
||||
$b = (string)$b['name'];
|
||||
if ($a === $b) {
|
||||
return 0;
|
||||
}
|
||||
return ($a < $b) ? -1 : 1;
|
||||
});
|
||||
break;
|
||||
// not-installed apps
|
||||
case 1:
|
||||
|
@ -104,6 +112,14 @@ class AppSettingsController extends Controller {
|
|||
$apps = array_filter($apps, function ($app) {
|
||||
return !$app['active'];
|
||||
});
|
||||
usort($apps, function ($a, $b) {
|
||||
$a = (string)$a['name'];
|
||||
$b = (string)$b['name'];
|
||||
if ($a === $b) {
|
||||
return 0;
|
||||
}
|
||||
return ($a < $b) ? -1 : 1;
|
||||
});
|
||||
break;
|
||||
default:
|
||||
if ($category === 2) {
|
||||
|
|
Loading…
Reference in a new issue