summaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'settings/Controller')
-rw-r--r--settings/Controller/CheckSetupController.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php
index 5da84eca68d..d757c017e18 100644
--- a/settings/Controller/CheckSetupController.php
+++ b/settings/Controller/CheckSetupController.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() {
@@ -621,6 +642,7 @@ Raw output
'mailSettingsDocumentation' => $this->urlGenerator->getAbsoluteURL('index.php/settings/admin'),
'isMemoryLimitSufficient' => $this->memoryInfo->isMemoryLimitSufficient(),
'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(),
+ 'recommendedPHPModules' => $this->hasRecommendedPHPModules(),
]
);
}