From: centaurix Date: Mon, 29 Jan 2001 21:11:32 +0000 (+0000) Subject: check if safe_mode is enabled (putenv is not allowed then) and X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b8c4285a3ce2b158639ac6da417d269d2312ea52;p=squirrelmail.git check if safe_mode is enabled (putenv is not allowed then) and check if LC_ALL is already == $sm_language to save an putenv git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@981 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/i18n.php b/functions/i18n.php index 56e09d16..641d2d72 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -9,6 +9,7 @@ ** Internally the output character set is used. Other characters are ** encoded using Unicode entities according to HTML 4.0. ** + ** $Id$ **/ $i18n_php = true; @@ -762,7 +763,9 @@ if (isset($sm_language) && $use_gettext && $squirrelmail_language != "" && $languages[$sm_language]["CHARSET"]) { - putenv("LC_ALL=".$sm_language); + if (ini_get("safe_mode")==FALSE && getenv("LC_ALL")!=$sm_language) { + putenv("LC_ALL=".$sm_language); + } setlocale("LC_ALL", $sm_language); bindtextdomain("squirrelmail", "../locale/"); textdomain("squirrelmail");