From edf2c0badb8e1921f474d33ec5bcc21607c87f70 Mon Sep 17 00:00:00 2001 From: tokul Date: Mon, 13 Oct 2003 18:43:38 +0000 Subject: [PATCH] more options that are changed in config git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5934 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/i18n.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/functions/i18n.php b/functions/i18n.php index 4895301d..48611d52 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -20,6 +20,7 @@ require_once(SM_PATH . 'functions/global.php'); /* Decodes a string to the internal encoding from the given charset */ function charset_decode ($charset, $string) { global $languages, $squirrelmail_language, $default_charset; + global $use_php_recode, $use_php_iconv, $agresive_decoding; if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { @@ -31,8 +32,10 @@ function charset_decode ($charset, $string) { set_my_charset(); // Variables that allow to use functions without function_exist() calls - $use_php_recode=false; - $use_php_iconv=false; + if (! isset($use_php_recode) || $use_php_recode=="" ) { + $use_php_recode=false; } + if (! isset($use_php_iconv) || $use_php_iconv=="" ) { + $use_php_iconv=false; } // Don't do conversion if charset is the same. if ( $charset == strtolower($default_charset) ) @@ -74,7 +77,8 @@ function charset_decode ($charset, $string) { $string = htmlspecialchars ($string); /* controls cpu and memory intensive decoding cycles */ - $agresive_decoding = false; + if (! isset($agresive_decoding) || $agresive_decoding=="" ) { + $agresive_decoding=false; } if (ereg('iso-8859-([[:digit:]]+)', $charset, $res)) { if ($res[1] == '1') { -- 2.25.1