diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-07-24 17:15:38 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-08-04 13:41:04 +0200 |
commit | 43d790239d44e1af6109f244920c3f8ca6513022 (patch) | |
tree | 826da1f73c5cc9324d563a50ae5e9716c138723a | |
parent | 65903a012a05d012b463d944594afa0104386426 (diff) | |
download | nextcloud-server-43d790239d44e1af6109f244920c3f8ca6513022.tar.gz nextcloud-server-43d790239d44e1af6109f244920c3f8ca6513022.zip |
Extend OC_Util::needUpgrade to also catch app upgrades
-rwxr-xr-x | lib/private/util.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 896b076afa6..3c832272ce8 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -1462,7 +1462,18 @@ class OC_Util { if (OC_Config::getValue('installed', false)) { $installedVersion = OC_Config::getValue('version', '0.0.0'); $currentVersion = implode('.', OC_Util::getVersion()); - return version_compare($currentVersion, $installedVersion, '>'); + if (version_compare($currentVersion, $installedVersion, '>')) { + return true; + } + + // also check for upgrades for apps + $apps = \OC_App::getEnabledApps(); + foreach ($apps as $app) { + if (\OC_App::shouldUpgrade($app)) { + return true; + } + } + return false; } else { return false; } |