Skip to content
Snippets Groups Projects
Commit 43d79023 authored by Robin Appelman's avatar Robin Appelman
Browse files

Extend OC_Util::needUpgrade to also catch app upgrades

parent 65903a01
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment