From: Robin Appelman Date: Thu, 24 Jul 2014 15:15:38 +0000 (+0200) Subject: Extend OC_Util::needUpgrade to also catch app upgrades X-Git-Tag: v8.0.0alpha1~867^2~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=43d790239d44e1af6109f244920c3f8ca6513022;p=nextcloud-server.git Extend OC_Util::needUpgrade to also catch app upgrades --- 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; }