summaryrefslogtreecommitdiffstats
path: root/apps/settings/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-03-08 08:53:12 +0100
committerGitHub <noreply@github.com>2022-03-08 08:53:12 +0100
commit23e8ae15aaea30359a927492155de13c97b311ce (patch)
treec4ec96e1edf2e269d14e1152e695119d6f7d5e05 /apps/settings/lib
parent697e1d602562fb8bad5598b18817e669f08f2b90 (diff)
parent3c8f8bc70aef23d04b1fc46a1a38ef696b32f736 (diff)
downloadnextcloud-server-23e8ae15aaea30359a927492155de13c97b311ce.tar.gz
nextcloud-server-23e8ae15aaea30359a927492155de13c97b311ce.zip
Merge pull request #31470 from nextcloud/enh/13099/allow-disable-imagick-warning
Diffstat (limited to 'apps/settings/lib')
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php35
1 files changed, 21 insertions, 14 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 1809a47ff44..37305f3edf5 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -714,20 +714,6 @@ Raw output
$recommendedPHPModules[] = 'intl';
}
- if (!extension_loaded('bcmath')) {
- $recommendedPHPModules[] = 'bcmath';
- }
-
- if (!extension_loaded('gmp')) {
- $recommendedPHPModules[] = 'gmp';
- }
-
- if ($this->config->getAppValue('theming', 'enabled', 'no') === 'yes') {
- if (!extension_loaded('imagick')) {
- $recommendedPHPModules[] = 'imagick';
- }
- }
-
if (!defined('PASSWORD_ARGON2I') && PHP_VERSION_ID >= 70400) {
// Installing php-sodium on >=php7.4 will provide PASSWORD_ARGON2I
// on previous version argon2 wasn't part of the "standard" extension
@@ -739,6 +725,25 @@ Raw output
return $recommendedPHPModules;
}
+ protected function isImagickEnabled(): bool {
+ if ($this->config->getAppValue('theming', 'enabled', 'no') === 'yes') {
+ if (!extension_loaded('imagick')) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ protected function areWebauthnExtensionsEnabled(): bool {
+ if (!extension_loaded('bcmath')) {
+ return false;
+ }
+ if (!extension_loaded('gmp')) {
+ return false;
+ }
+ return true;
+ }
+
protected function isMysqlUsedWithoutUTF8MB4(): bool {
return ($this->config->getSystemValue('dbtype', 'sqlite') === 'mysql') && ($this->config->getSystemValue('mysql.utf8mb4', false) === false);
}
@@ -870,6 +875,8 @@ Raw output
'databaseConversionDocumentation' => $this->urlGenerator->linkToDocs('admin-db-conversion'),
'isMemoryLimitSufficient' => $this->memoryInfo->isMemoryLimitSufficient(),
'appDirsWithDifferentOwner' => $this->getAppDirsWithDifferentOwner(),
+ 'isImagickEnabled' => $this->isImagickEnabled(),
+ 'areWebauthnExtensionsEnabled' => $this->areWebauthnExtensionsEnabled(),
'recommendedPHPModules' => $this->hasRecommendedPHPModules(),
'pendingBigIntConversionColumns' => $this->hasBigIntConversionPendingColumns(),
'isMysqlUsedWithoutUTF8MB4' => $this->isMysqlUsedWithoutUTF8MB4(),