From e76ded074c951225403ff09ea58000073ca83d3d Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Wed, 14 May 2014 13:01:39 +0000 Subject: [PATCH] Remove encoding-related localization constants --- src/mibew/libs/common/response.php | 3 +-- src/mibew/locales/en/properties | 3 --- src/mibew/locales/names/level1 | 2 -- src/mibew/locales/names/properties | 2 -- src/mibew/operator/translate.php | 28 +++++++++++++--------------- 5 files changed, 14 insertions(+), 24 deletions(-) diff --git a/src/mibew/libs/common/response.php b/src/mibew/libs/common/response.php index ece1c2a6..df316afc 100644 --- a/src/mibew/libs/common/response.php +++ b/src/mibew/libs/common/response.php @@ -56,11 +56,10 @@ function start_xml_output() function start_html_output() { - $charset = getstring("output_charset"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Pragma: no-cache"); - header("Content-type: text/html" . (isset($charset) ? "; charset=" . $charset : "")); + header("Content-type: text/html; charset=utf-8"); } /** diff --git a/src/mibew/locales/en/properties b/src/mibew/locales/en/properties index b6de34a3..90f8c03b 100644 --- a/src/mibew/locales/en/properties +++ b/src/mibew/locales/en/properties @@ -1,6 +1,3 @@ -encoding=utf-8 -output_charset=utf-8 -output_encoding=utf-8 admin.content.client_agents=Create or delete company operators. Manage their permissions. admin.content.client_gen_button=Button HTML code generation. admin.content.client_settings=Specify options affecting chat window and common system behavior. diff --git a/src/mibew/locales/names/level1 b/src/mibew/locales/names/level1 index de17a0cc..707f828b 100644 --- a/src/mibew/locales/names/level1 +++ b/src/mibew/locales/names/level1 @@ -66,8 +66,6 @@ mailthread.perform mailthread.title notify.new.subject notify.new.text -output_charset -output_encoding page.chat.old_browser.close page.chat.old_browser.list page.chat.old_browser.problem diff --git a/src/mibew/locales/names/properties b/src/mibew/locales/names/properties index 4d9e910e..2b4e5c64 100644 --- a/src/mibew/locales/names/properties +++ b/src/mibew/locales/names/properties @@ -1,5 +1,3 @@ -encoding=utf-8 - ar=العربية be=Беларуская bg=Български diff --git a/src/mibew/operator/translate.php b/src/mibew/operator/translate.php index 2ad20927..674dcc2e 100644 --- a/src/mibew/operator/translate.php +++ b/src/mibew/operator/translate.php @@ -104,22 +104,20 @@ if ($show == 's1') { } foreach ($all_keys as $key) { - if ($key != 'output_charset') { - $t_source = htmlspecialchars($lang1[$key]); - if (isset($lang2[$key])) { - $value = htmlspecialchars($lang2[$key]); - } else { - $value = "absent"; - } - $result[] = array( - 'id' => $key, - 'l1' => $t_source, - 'l2' => $value, - 'idToPage' => $key, - 'l1ToPage' => $t_source, - 'l2ToPage' => $value, - ); + $t_source = htmlspecialchars($lang1[$key]); + if (isset($lang2[$key])) { + $value = htmlspecialchars($lang2[$key]); + } else { + $value = "absent"; } + $result[] = array( + 'id' => $key, + 'l1' => $t_source, + 'l2' => $value, + 'idToPage' => $key, + 'l1ToPage' => $t_source, + 'l2ToPage' => $value, + ); } $order = verify_param("sort", "/^(id|l1)$/", "id");