summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-17 15:43:50 +0100
committerGitHub <noreply@github.com>2016-11-17 15:43:50 +0100
commit9cec82d084f48002c960820e9d092ba429c25e08 (patch)
tree8d58ddf4c2e3ec8405bfe98ae322dbd0e4cc8555 /lib
parenta0059dfee127120065047878edd1ac2b4258fe93 (diff)
parent6a525fadbbb7e213018fdcbb2fdbd1cb1a01f8c9 (diff)
downloadnextcloud-server-9cec82d084f48002c960820e9d092ba429c25e08.tar.gz
nextcloud-server-9cec82d084f48002c960820e9d092ba429c25e08.zip
Merge pull request #2153 from nextcloud/version-hint
add explanatory text of what to do on app version error
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/base.php b/lib/base.php
index 909a62040ee..d6c6e17eff9 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -377,7 +377,7 @@ class OC {
\OCP\Util::addScript('update');
\OCP\Util::addStyle('update');
- /** @var \OCP\App\IAppManager $appManager */
+ /** @var \OC\App\AppManager $appManager */
$appManager = \OC::$server->getAppManager();
$tmpl = new OC_Template('', 'update.admin', 'guest');
@@ -387,14 +387,19 @@ class OC {
// get third party apps
$ocVersion = \OCP\Util::getVersion();
$incompatibleApps = $appManager->getIncompatibleApps($ocVersion);
+ $incompatibleShippedApps = [];
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);
+ $incompatibleShippedApps[] = $appInfo['name'] . ' (' . $appInfo['id'] . ')';
}
}
+ if (!empty($incompatibleShippedApps)) {
+ $l = \OC::$server->getL10N('core');
+ $hint = $l->t('The files of the app %$1s were not replaced correctly. Make sure it is a version compatible with the server.', [implode(', ', $incompatibleShippedApps)]);
+ throw new \OC\HintException('The files of the app ' . implode(', ', $incompatibleShippedApps) . ' were not replaced correctly. Make sure it is a version compatible with the server.', $hint);
+ }
+
$tmpl->assign('appsToUpgrade', $appManager->getAppsNeedingUpgrade($ocVersion));
$tmpl->assign('incompatibleAppsList', $incompatibleApps);
$tmpl->assign('productName', 'Nextcloud'); // for now