aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-10-26 16:16:39 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-10-26 16:16:39 +0200
commit424987181764792c33a03cb4351063286f6fae96 (patch)
treee3690a96d7602aa68186a955871e0202aaf0b842 /apps
parentd551a0d88662ae7e78308464dbdaddd5c3400c35 (diff)
downloadnextcloud-server-424987181764792c33a03cb4351063286f6fae96.tar.gz
nextcloud-server-424987181764792c33a03cb4351063286f6fae96.zip
Add links to documentation for PHP modules
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/SetupChecks/PhpModules.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/settings/lib/SetupChecks/PhpModules.php b/apps/settings/lib/SetupChecks/PhpModules.php
index 3f434ea6742..870c2b7ada1 100644
--- a/apps/settings/lib/SetupChecks/PhpModules.php
+++ b/apps/settings/lib/SetupChecks/PhpModules.php
@@ -26,6 +26,7 @@ declare(strict_types=1);
namespace OCA\Settings\SetupChecks;
use OCP\IL10N;
+use OCP\IURLGenerator;
use OCP\SetupCheck\ISetupCheck;
use OCP\SetupCheck\SetupResult;
@@ -57,6 +58,7 @@ class PhpModules implements ISetupCheck {
public function __construct(
private IL10N $l10n,
+ private IURLGenerator $urlGenerator,
) {
}
@@ -72,9 +74,15 @@ class PhpModules implements ISetupCheck {
$missingRecommendedModules = $this->getMissingModules(self::RECOMMENDED_MODULES);
$missingRequiredModules = $this->getMissingModules(self::REQUIRED_MODULES);
if (!empty($missingRequiredModules)) {
- return SetupResult::error($this->l10n->t('This instance is missing some required PHP modules. It is required to install them: %s', implode(', ', $missingRequiredModules)));
+ return SetupResult::error(
+ $this->l10n->t('This instance is missing some required PHP modules. It is required to install them: %s', implode(', ', $missingRequiredModules)),
+ $this->urlGenerator->linkToDocs('admin-php-modules')
+ );
} elseif (!empty($missingRecommendedModules)) {
- return SetupResult::info($this->l10n->t('This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them: %s', implode(', ', $missingRecommendedModules)));
+ return SetupResult::info(
+ $this->l10n->t('This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them: %s', implode(', ', $missingRecommendedModules)),
+ $this->urlGenerator->linkToDocs('admin-php-modules')
+ );
} else {
return SetupResult::success();
}