Fix missing php-intl is not blocking (not working on windows)

This commit is contained in:
Laurent Destailleur 2019-06-30 16:19:26 +02:00
parent a992690c43
commit 8f5b575b19
3 changed files with 8 additions and 6 deletions

View File

@ -653,6 +653,8 @@ default_socket_timeout = 60
; extension folders as well as the separate PECL DLL download (PHP 5). ; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive. ; Be sure to appropriately set the extension_dir directive.
; If an extension does not load, run "deplister.exe php_xxx.dll" to get list of dependency dll missing.
extension=php_bz2.dll extension=php_bz2.dll
extension=php_curl.dll extension=php_curl.dll
;extension=php_dba.dll ;extension=php_dba.dll

View File

@ -7037,7 +7037,7 @@ function getLanguageCodeFromCountryCode($countrycode)
$buildprimarykeytotest = strtolower($countrycode).'-'.strtoupper($countrycode); $buildprimarykeytotest = strtolower($countrycode).'-'.strtoupper($countrycode);
if (in_array($buildprimarykeytotest, $locales)) return strtolower($countrycode).'_'.strtoupper($countrycode); if (in_array($buildprimarykeytotest, $locales)) return strtolower($countrycode).'_'.strtoupper($countrycode);
if (function_exists('locale_get_primary_language')) // Need extension php-intl if (function_exists('locale_get_primary_language') && function_exists('locale_get_region')) // Need extension php-intl
{ {
foreach ($locales as $locale) foreach ($locales as $locale)
{ {

View File

@ -127,7 +127,7 @@ if (! function_exists("imagecreate"))
{ {
$langs->load("errors"); $langs->load("errors");
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportGD")."<br>\n"; print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportGD")."<br>\n";
// $checksok=0; // If image ko, just warning. So check must still be 1 (otherwise no way to install) // $checksok=0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
} }
else else
{ {
@ -140,7 +140,7 @@ if (! function_exists("curl_init"))
{ {
$langs->load("errors"); $langs->load("errors");
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportCurl")."<br>\n"; print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportCurl")."<br>\n";
// $checksok=0; // If image ko, just warning. So check must still be 1 (otherwise no way to install) // $checksok=0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
} }
else else
{ {
@ -153,7 +153,7 @@ if (! function_exists("utf8_encode"))
{ {
$langs->load("errors"); $langs->load("errors");
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportUTF8")."<br>\n"; print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportUTF8")."<br>\n";
// $checksok=0; // If image ko, just warning. So check must still be 1 (otherwise no way to install) // $checksok=0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
} }
else else
{ {
@ -162,11 +162,11 @@ else
// Check if UTF8 supported // Check if UTF8 supported
if (! function_exists("locale_get_primary_language")) if (! function_exists("locale_get_primary_language") || ! function_exists("locale_get_region"))
{ {
$langs->load("errors"); $langs->load("errors");
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportIntl")."<br>\n"; print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportIntl")."<br>\n";
// $checksok=0; // If image ko, just warning. So check must still be 1 (otherwise no way to install) // $checksok=0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
} }
else else
{ {