Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-06-23 15:55:21 +0400
committerRobin Appelman <icewind@owncloud.com>2014-06-23 15:55:21 +0400
commit8b41689fe6efb6f297a4287c62079336272561a6 (patch)
tree156cd3e2421140ace24c24b947c05e4064c13a9e /lib/private/app.php
parent81ecbbb0614ecfe9953d813f92424f299a1e2834 (diff)
Only cache enabled apps when logged in
Diffstat (limited to 'lib/private/app.php')
-rw-r--r--lib/private/app.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/app.php b/lib/private/app.php
index a62623905ff..dc058cadc90 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -174,6 +174,7 @@ class OC_App {
}
$appConfig = \OC::$server->getAppConfig();
$appStatus = $appConfig->getValues(false, 'enabled');
+ $user = \OC_User::getUser();
foreach ($appStatus as $app => $enabled) {
if ($app === 'files') {
continue;
@@ -181,7 +182,6 @@ class OC_App {
if ($enabled === 'yes') {
$apps[] = $app;
} else if ($enabled !== 'no') {
- $user = \OC_User::getUser();
$groups = json_decode($enabled);
if (is_array($groups)) {
foreach ($groups as $group) {
@@ -195,7 +195,9 @@ class OC_App {
}
sort($apps);
array_unshift($apps, 'files');
- self::$enabledAppsCache = $apps;
+ if ($user) {
+ self::$enabledAppsCache = $apps;
+ }
return $apps;
}