diff options
-rw-r--r-- | apps/settings/lib/Controller/CheckSetupController.php | 35 | ||||
-rw-r--r-- | core/js/setupchecks.js | 18 |
2 files changed, 39 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(), diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index 95d8c6cbdc2..3b6c2ef71c1 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -423,6 +423,24 @@ type: OC.SetupChecks.MESSAGE_TYPE_INFO }) } + if (!data.isImagickEnabled) { + messages.push({ + msg: t( + 'core', + 'The PHP module "imagick" is not enabled although the theming app is. For favicon generation to work correctly, you need to install and enable this module.' + ), + type: OC.SetupChecks.MESSAGE_TYPE_INFO + }) + } + if (!data.areWebauthnExtensionsEnabled) { + messages.push({ + msg: t( + 'core', + 'The PHP modules "gmp" and/or "bcmath" are not enabled. If you use WebAuthn passwordless authentication, these modules are required.' + ), + type: OC.SetupChecks.MESSAGE_TYPE_INFO + }) + } if (data.imageMagickLacksSVGSupport) { messages.push({ msg: t( |