From faba67b2926aaebcf667ac500bd36dd81e9af45a Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Mon, 17 Dec 2018 15:48:06 +0100 Subject: [PATCH] =?UTF-8?q?:heavy=5Fplus=5Fsign:=20N=C2=B01885=20add=20php?= =?UTF-8?q?-gd=20as=20a=20mandatory=20extension?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 3 ++- setup/setuputils.class.inc.php | 24 +++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 8bd34a0a7..3b432c153 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,8 @@ "ext-soap": "*", "ext-json": "*", "ext-zip": "*", - "ext-mysqli": "*" + "ext-mysqli": "*", + "ext-gd": "*" }, "config": { "platform": { diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index a27ebd6e2..31097f5d9 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -89,11 +89,25 @@ class SetupUtils // Check the common directories $aWritableDirsErrors = self::CheckWritableDirs(array('log', 'env-production', 'env-production-build', 'conf', 'data')); $aResult = array_merge($aResult, $aWritableDirsErrors); - - $aMandatoryExtensions = array('mysqli', 'iconv', 'simplexml', 'soap', 'hash', 'json', 'session', 'pcre', 'dom', 'zlib', 'zip'); - $aOptionalExtensions = array('mcrypt' => 'Strong encryption will not be used.', - 'ldap' => 'LDAP authentication will be disabled.', - 'gd' => 'PDF export will be disabled. Also, image resizing will be disabled on profile pictures (May increase database size).'); + + $aMandatoryExtensions = array( + 'mysqli', + 'iconv', + 'simplexml', + 'soap', + 'hash', + 'json', + 'session', + 'pcre', + 'dom', + 'zlib', + 'zip', + 'gd', // used to test image type (always returns false if not installed), image resizing, PDF export + ); + $aOptionalExtensions = array( + 'mcrypt' => 'Strong encryption will not be used.', + 'ldap' => 'LDAP authentication will be disabled.', + ); asort($aMandatoryExtensions); // Sort the list to look clean ! ksort($aOptionalExtensions); // Sort the list to look clean ! $aExtensionsOk = array();