From 0d35fcc72ae98d534ae280a2750e36ee2ceaf4f3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 20 Oct 2003 19:03:46 +0000 Subject: [PATCH] fix to allow to load non-iso-8859-1 languages without an system-charset set --- phpgwapi/inc/class.translation_sql.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.translation_sql.inc.php b/phpgwapi/inc/class.translation_sql.inc.php index 4a79b96615..095940bcad 100644 --- a/phpgwapi/inc/class.translation_sql.inc.php +++ b/phpgwapi/inc/class.translation_sql.inc.php @@ -377,14 +377,17 @@ $GLOBALS['phpgw_info']['server']['lang_ctimes'][$lang][$app] = filectime($appfile); } } - $charset = @$raw['common']['charset'] ? $raw['common']['charset'] : $this->charset($lang); + $charset = strtolower(@$raw['common']['charset'] ? $raw['common']['charset'] : $this->charset($lang)); //echo "

lang='$lang', charset='$charset', system_charset='$this->system_charset')

\n"; //echo "

raw($lang)=

".print_r($raw,True)."
\n"; foreach($raw as $app_name => $ids) { foreach($ids as $message_id => $content) { - $content = $this->convert($content,$charset,$this->system_charset); + if ($this->system_charset) + { + $content = $this->convert($content,$charset,$this->system_charset); + } $addit = False; //echo '
APPNAME:' . $app_name . ' PHRASE:' . $message_id; if ($upgrademethod == 'addmissing')