summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-01-16 13:17:41 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-01-16 13:17:41 +0100
commit27c31de8df45a148743775a714d4006b06aa3e21 (patch)
tree18605a93cad6c981c1f9652397093fbc1496f8b6
parenta65f666834742f8df25493a11e10063e1e5ff98a (diff)
parentd3cd2b3e0fc963865bb27430069f8e009b457da6 (diff)
downloadnextcloud-server-27c31de8df45a148743775a714d4006b06aa3e21.tar.gz
nextcloud-server-27c31de8df45a148743775a714d4006b06aa3e21.zip
Merge pull request #13412 from owncloud/app-management-sort
sorting enabled and disabled apps alphabetically - fixes #13404
-rw-r--r--settings/controller/appsettingscontroller.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php
index 55677d64870..816b7b2e65c 100644
--- a/settings/controller/appsettingscontroller.php
+++ b/settings/controller/appsettingscontroller.php
@@ -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) {