diff options
author | szaimen <szaimen@e.mail.de> | 2022-03-05 20:26:16 +0100 |
---|---|---|
committer | szaimen <szaimen@e.mail.de> | 2022-03-07 17:35:12 +0100 |
commit | 7dca146b5830b8232b1684c8bb59948898b9b618 (patch) | |
tree | ecb4192dec4a875e5e580238e1243a9b413c2818 /apps/settings | |
parent | e96c85921bcd3c730fe0f5dd3fd39c652c0220a1 (diff) | |
download | nextcloud-server-7dca146b5830b8232b1684c8bb59948898b9b618.tar.gz nextcloud-server-7dca146b5830b8232b1684c8bb59948898b9b618.zip |
allow to disable the imagick warning
Signed-off-by: szaimen <szaimen@e.mail.de>
Co-Authored-By: MichaIng <micha@dietpi.com>
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/lib/Controller/CheckSetupController.php | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index b615bfae793..4c6ca58d393 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -709,20 +709,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 @@ -734,6 +720,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); } @@ -865,6 +870,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(), |