[Pkg-owncloud-commits] [owncloud] 15/67: Only cache enabled apps when logged in

David Prévot taffit at moszumanska.debian.org
Fri Jun 27 23:58:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 8b41689fe6efb6f297a4287c62079336272561a6
Author: Robin Appelman <icewind at owncloud.com>
Date:   Mon Jun 23 13:55:21 2014 +0200

    Only cache enabled apps when logged in
---
 lib/private/app.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/private/app.php b/lib/private/app.php
index a626239..dc058ca 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;
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list