diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 9 | ||||
-rw-r--r-- | lib/private/app/appmanager.php | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lib/base.php b/lib/base.php index 0a0d66aaf25..860260576dc 100644 --- a/lib/base.php +++ b/lib/base.php @@ -376,14 +376,15 @@ class OC { // if not a core upgrade, then it's apps upgrade if (version_compare($currentVersion, $installedVersion, '=')) { - $tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade()); $tmpl->assign('isAppsOnlyUpgrade', true); } else { - // get third party apps - $version = OC_Util::getVersion(); - $tmpl->assign('appList', $appManager->getIncompatibleApps($version)); $tmpl->assign('isAppsOnlyUpgrade', false); } + + // get third party apps + $ocVersion = OC_Util::getVersion(); + $tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion)); + $tmpl->assign('incompatibleAppsList', $appManager->getIncompatibleApps($ocVersion)); $tmpl->assign('productName', 'ownCloud'); // for now $tmpl->assign('oldTheme', $oldTheme); $tmpl->printPage(); diff --git a/lib/private/app/appmanager.php b/lib/private/app/appmanager.php index 86674aa047c..75b1c0a7865 100644 --- a/lib/private/app/appmanager.php +++ b/lib/private/app/appmanager.php @@ -213,11 +213,12 @@ class AppManager implements IAppManager { /** * Returns a list of apps that need upgrade * + * @param array $version ownCloud version as array of version components * @return array list of app info from apps that need an upgrade * * @internal */ - public function getAppsNeedingUpgrade() { + public function getAppsNeedingUpgrade($ocVersion) { $appsToUpgrade = []; $apps = $this->getInstalledApps(); foreach ($apps as $appId) { @@ -226,6 +227,7 @@ class AppManager implements IAppManager { if ($appDbVersion && isset($appInfo['version']) && version_compare($appInfo['version'], $appDbVersion, '>') + && \OC_App::isAppCompatible($ocVersion, $appInfo) ) { $appsToUpgrade[] = $appInfo; } @@ -258,7 +260,7 @@ class AppManager implements IAppManager { /** * Returns a list of apps incompatible with the given version * - * @param array $version version as array of version components + * @param array $version ownCloud version as array of version components * * @return array list of app info from incompatible apps * |