Fix: Missing conf

This commit is contained in:
eldy 2011-09-20 13:44:43 +02:00
parent 422ee93993
commit a81271b8ca

View File

@ -4030,11 +4030,14 @@ function utf8_check($str)
/** /**
* Return an UTF-8 string encoded into OS filesystem encoding. This function is used to define * Return an UTF-8 string encoded into OS filesystem encoding. This function is used to define
* value to pass to filesystem PHP functions. * value to pass to filesystem PHP functions.
* @param $str String to encode (UTF-8) *
* @param string $str String to encode (UTF-8)
* @return string Encoded string (UTF-8, ISO-8859-1) * @return string Encoded string (UTF-8, ISO-8859-1)
*/ */
function dol_osencode($str) function dol_osencode($str)
{ {
global $conf;
$tmp=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 $tmp=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0
if (empty($tmp) && ! empty($_SERVER["WINDIR"])) $tmp='iso-8859-1'; // By default for windows if (empty($tmp) && ! empty($_SERVER["WINDIR"])) $tmp='iso-8859-1'; // By default for windows
if (empty($tmp)) $tmp='utf-8'; // By default for other if (empty($tmp)) $tmp='utf-8'; // By default for other