diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-11-02 21:20:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-02 21:20:23 +0100 |
commit | e74c52726877b46c471030c59ad75ea51d52fd6c (patch) | |
tree | fa0b37a15a8f930f9be02deaba07d859839b5181 /lib/base.php | |
parent | 9eede5a573d7328e74dad059b933cc25ad070bd9 (diff) | |
parent | 9b66e8f7d96cc5ca014d3f6b8031eb380d981adb (diff) | |
download | nextcloud-server-e74c52726877b46c471030c59ad75ea51d52fd6c.tar.gz nextcloud-server-e74c52726877b46c471030c59ad75ea51d52fd6c.zip |
Merge pull request #1973 from nextcloud/dont-disable-shipped-apps-but-throw-instead
Throw an exception when a shipped app was not replaced before the update
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 28fc57161c3..909a62040ee 100644 --- a/lib/base.php +++ b/lib/base.php @@ -377,6 +377,7 @@ class OC { \OCP\Util::addScript('update'); \OCP\Util::addStyle('update'); + /** @var \OCP\App\IAppManager $appManager */ $appManager = \OC::$server->getAppManager(); $tmpl = new OC_Template('', 'update.admin', 'guest'); @@ -385,8 +386,17 @@ class OC { // get third party apps $ocVersion = \OCP\Util::getVersion(); + $incompatibleApps = $appManager->getIncompatibleApps($ocVersion); + foreach ($incompatibleApps as $appInfo) { + if ($appManager->isShipped($appInfo['id'])) { + $l = \OC::$server->getL10N('core'); + $hint = $l->t('The files of the app "%$1s" (%$2s) were not replaced correctly.', [$appInfo['name'], $appInfo['id']]); + throw new \OC\HintException('The files of the app "' . $appInfo['name'] . '" (' . $appInfo['id'] . ') were not replaced correctly.', $hint); + } + } + $tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion)); - $tmpl->assign('incompatibleAppsList', $appManager->getIncompatibleApps($ocVersion)); + $tmpl->assign('incompatibleAppsList', $incompatibleApps); $tmpl->assign('productName', 'Nextcloud'); // for now $tmpl->assign('oldTheme', $oldTheme); $tmpl->printPage(); |