Fix sorting of apps

This commit is contained in:
Robin Appelman 2014-04-21 13:38:08 +02:00 committed by Thomas Müller
parent 7272779456
commit 3b1f291c60
1 changed files with 5 additions and 1 deletions

View File

@ -169,8 +169,10 @@ class OC_App {
}
$appConfig = \OC::$server->getAppConfig();
$appStatus = $appConfig->getValues(false, 'enabled');
$apps = array();
foreach ($appStatus as $app => $enabled) {
if ($app === 'files') {
continue;
}
if ($enabled === 'yes') {
$apps[] = $app;
} else if ($enabled !== 'no') {
@ -186,6 +188,8 @@ class OC_App {
}
}
}
sort($apps);
array_unshift($apps, 'files');
self::$enabledAppsCache = $apps;
return $apps;
}