forked from Wavyzz/dolibarr
Fix: Avoid to have a special php module.
This commit is contained in:
@@ -3994,18 +3994,6 @@ function printCommonFooter($zone='private')
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert unicode
|
|
||||||
*
|
|
||||||
* @param string $unicode Unicode
|
|
||||||
* @param string $encoding Encoding type
|
|
||||||
* @return string Unicode converted
|
|
||||||
*/
|
|
||||||
function unichr($unicode , $encoding = 'UTF-8')
|
|
||||||
{
|
|
||||||
return mb_convert_encoding("&#{$unicode};", $encoding, 'HTML-ENTITIES');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert an array with RGB value into hex RGB value
|
* Convert an array with RGB value into hex RGB value
|
||||||
*
|
*
|
||||||
@@ -4035,11 +4023,11 @@ function getCurrencySymbol($currency_code)
|
|||||||
|
|
||||||
$form->load_cache_currencies();
|
$form->load_cache_currencies();
|
||||||
|
|
||||||
if (is_array($form->cache_currencies[$currency_code]['unicode']) && ! empty($form->cache_currencies[$currency_code]['unicode']))
|
if (function_exists("mb_convert_encoding") && is_array($form->cache_currencies[$currency_code]['unicode']) && ! empty($form->cache_currencies[$currency_code]['unicode']))
|
||||||
{
|
{
|
||||||
foreach($form->cache_currencies[$currency_code]['unicode'] as $unicode)
|
foreach($form->cache_currencies[$currency_code]['unicode'] as $unicode)
|
||||||
{
|
{
|
||||||
$currency_sign.= unichr($unicode);
|
$currency_sign .= mb_convert_encoding("&#{$unicode};", "UTF-8", 'HTML-ENTITIES');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -144,6 +144,18 @@ else
|
|||||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportUTF8")."<br>\n";
|
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportUTF8")."<br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if mb_convert_encoding supported (used by getCurrencySymbol)
|
||||||
|
/*if (! function_exists("mb_convert_encoding"))
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportUTF8")."<br>\n";
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
// Check memory
|
// Check memory
|
||||||
$memrequiredorig='32M';
|
$memrequiredorig='32M';
|
||||||
|
|||||||
Reference in New Issue
Block a user