Skip to content
Snippets Groups Projects
Commit d3cd2b3e authored by Thomas Müller's avatar Thomas Müller
Browse files

sorting enabled and disabled apps alphabetically - fixes #13404

parent a65f6668
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment