diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-04 13:56:41 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-04 13:56:41 +0200 |
commit | 1a7df3323391f6d6f7ef04de2687b3a566ab6351 (patch) | |
tree | 9e3bc1db6aa3f05886a747bcf728040a79a4cdcd /lib/private/util.php | |
parent | d261ca616b2ffec54dafb83818cfabef5306944b (diff) | |
parent | 4a93a6e0600e4445333bd22015fc9d22d4251219 (diff) | |
download | nextcloud-server-1a7df3323391f6d6f7ef04de2687b3a566ab6351.tar.gz nextcloud-server-1a7df3323391f6d6f7ef04de2687b3a566ab6351.zip |
Merge pull request #10818 from owncloud/enableappforgroupfix
Fix upgrade process when apps enabled for specific groups
Diffstat (limited to 'lib/private/util.php')
-rwxr-xr-x | lib/private/util.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 2a0f9197e3c..6f45e00215d 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -1461,9 +1461,11 @@ class OC_Util { } /** - * Check whether the instance needs to preform an upgrade + * Check whether the instance needs to perform an upgrade, + * either when the core version is higher or any app requires + * an upgrade. * - * @return bool + * @return bool whether the core or any app needs an upgrade */ public static function needUpgrade() { if (OC_Config::getValue('installed', false)) { @@ -1473,14 +1475,16 @@ class OC_Util { return true; } - // also check for upgrades for apps - $apps = \OC_App::getEnabledApps(); + // also check for upgrades for apps (independently from the user) + $apps = \OC_App::getEnabledApps(false, true); + $shouldUpgrade = false; foreach ($apps as $app) { if (\OC_App::shouldUpgrade($app)) { - return true; + $shouldUpgrade = true; + break; } } - return false; + return $shouldUpgrade; } else { return false; } |