Extend OC_Util::needUpgrade to also catch app upgrades
This commit is contained in:
parent
65903a012a
commit
43d790239d
|
@ -1462,7 +1462,18 @@ class OC_Util {
|
||||||
if (OC_Config::getValue('installed', false)) {
|
if (OC_Config::getValue('installed', false)) {
|
||||||
$installedVersion = OC_Config::getValue('version', '0.0.0');
|
$installedVersion = OC_Config::getValue('version', '0.0.0');
|
||||||
$currentVersion = implode('.', OC_Util::getVersion());
|
$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 {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue