diff options
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/CheckSetupController.php | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php index e906af77bae..4211b9b4c6c 100644 --- a/settings/Controller/CheckSetupController.php +++ b/settings/Controller/CheckSetupController.php @@ -527,7 +527,7 @@ Raw output return []; } - protected function isPhpMailerUsed(): bool { + protected function isPHPMailerUsed(): bool { return $this->config->getSystemValue('mail_smtpmode', 'smtp') === 'php'; } @@ -583,6 +583,27 @@ Raw output } /** + * Checks for potential PHP modules that would improve the instance + * + * @return string[] A list of PHP modules that is recommended + */ + protected function hasRecommendedPHPModules(): array { + $recommendedPHPModules = []; + + if (!function_exists('grapheme_strlen')) { + $recommendedPHPModules[] = 'intl'; + } + + if ($this->config->getAppValue('theming', 'enabled', 'no') === 'yes') { + if (!extension_loaded('imagick')) { + $recommendedPHPModules[] = 'imagick'; + } + } + + return $recommendedPHPModules; + } + + /** * @return DataResponse */ public function check() { @@ -617,10 +638,11 @@ Raw output 'missingIndexes' => $this->hasMissingIndexes(), 'isSqliteUsed' => $this->isSqliteUsed(), 'databaseConversionDocumentation' => $this->urlGenerator->linkToDocs('admin-db-conversion'), - 'isPhpMailerUsed' => $this->isPhpMailerUsed(), + 'isPHPMailerUsed' => $this->isPHPMailerUsed(), 'mailSettingsDocumentation' => $this->urlGenerator->getAbsoluteURL('index.php/settings/admin'), 'isMemoryLimitSufficient' => $this->memoryInfo->isMemoryLimitSufficient(), 'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(), + 'recommendedPHPModules' => $this->hasRecommendedPHPModules(), ] ); } |