From b8c4285a3ce2b158639ac6da417d269d2312ea52 Mon Sep 17 00:00:00 2001 From: centaurix Date: Mon, 29 Jan 2001 21:11:32 +0000 Subject: [PATCH] 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 --- functions/i18n.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"); -- 2.25.1