소스 검색

check if safe_mode is enabled (putenv is not allowed then) and
check if LC_ALL is already == $sm_language to save an putenv

centaurix 24 년 전
부모
커밋
f6ac0367c1
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      functions/i18n.php

+ 4 - 1
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");