Attached Files |
unified_charset_core.patch [^] (21,492 bytes) 2012-07-13 11:34
[Show Content]
Index: admin_templates/browser/browser_header.tpl
===================================================================
--- admin_templates/browser/browser_header.tpl (revision 15437)
+++ admin_templates/browser/browser_header.tpl (working copy)
@@ -4,7 +4,7 @@
<head>
<title><inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/></title>
-<meta http-equiv="content-type" content="text/html; charset=<inp2:lang_GetCharset/>"/>
+<meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>"/>
<meta name="keywords" content="..."/>
<meta name="description" content="..."/>
<meta name="robots" content="all"/>
Index: admin_templates/catalog_tab.tpl
===================================================================
--- admin_templates/catalog_tab.tpl (revision 15437)
+++ admin_templates/catalog_tab.tpl (working copy)
@@ -21,8 +21,7 @@
$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
</inp2:m_if>
<inp2:m_else/>
- <inp2:lang.current_Field name="Charset" result_to_var="charset"/>
- <inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+ <inp2:lang.current_SetContentType content_type="text/plain"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
Index: admin_templates/categories/permissions_tab.tpl
===================================================================
--- admin_templates/categories/permissions_tab.tpl (revision 15437)
+++ admin_templates/categories/permissions_tab.tpl (working copy)
@@ -3,8 +3,7 @@
<div id="<inp2:m_param name="item_prefix"/>_div" prefix="<inp2:m_param name="item_prefix"/>" group_id="-1" class="catalog-tab"><!-- IE minimal height problem fix --></div>
<script type="text/javascript">$PermManager.registerTab('<inp2:m_param name="item_prefix"/>');</script>
<inp2:m_else/>
- <inp2:lang.current_Field name="Charset" result_to_var="charset"/>
- <inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+ <inp2:lang.current_SetContentType content_type="text/plain"/>
if ($request_visible) {
document.getElementById('<inp2:m_get name="item_prefix"/>_div').setAttribute('group_id', <inp2:m_get name="group_id"/>);
maximizeElement( jq('#<inp2:m_get name="item_prefix"/>_div') );
Index: admin_templates/incs/close_popup.tpl
===================================================================
--- admin_templates/incs/close_popup.tpl (revision 15437)
+++ admin_templates/incs/close_popup.tpl (working copy)
@@ -1,7 +1,5 @@
<inp2:m_NoDebug/>
<inp2:m_Set skip_last_template="1"/>
-<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
-<inp2:m_Header data="Content-type: text/html; charset=$charset"/>
<html>
<head>
<title></title>
Index: admin_templates/incs/header.tpl
===================================================================
--- admin_templates/incs/header.tpl (revision 15437)
+++ admin_templates/incs/header.tpl (working copy)
@@ -6,7 +6,7 @@
<head>
<title><inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/></title>
-<meta http-equiv="content-type" content="text/html; charset=<inp2:lang_GetCharset/>"/>
+<meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>"/>
<meta name="keywords" content="..."/>
<meta name="description" content="..."/>
<meta name="robots" content="all"/>
Index: admin_templates/index.tpl
===================================================================
--- admin_templates/index.tpl (revision 15437)
+++ admin_templates/index.tpl (working copy)
@@ -6,7 +6,7 @@
<inp2:m_NoDebug/>
<html>
<head>
- <meta http-equiv="content-type" content="text/html; charset=<inp2:lang_GetCharset/>">
+ <meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>">
<title><inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/></title>
<inp2:m_base_ref/>
Index: admin_templates/regional/languages_edit.tpl
===================================================================
--- admin_templates/regional/languages_edit.tpl (revision 15437)
+++ admin_templates/regional/languages_edit.tpl (working copy)
@@ -61,7 +61,6 @@
<inp2:m_RenderElement name="inp_id_label" prefix="lang" field="LanguageId"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="PackName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="LocalName"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="Charset"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="InputDateFormat"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="InputTimeFormat"/>
Index: admin_templates/reviews/reviews_tab.tpl
===================================================================
--- admin_templates/reviews/reviews_tab.tpl (revision 15437)
+++ admin_templates/reviews/reviews_tab.tpl (working copy)
@@ -1,8 +1,7 @@
<inp2:m_RequireLogin permissions="in-portal:reviews.view" system="1"/>
<inp2:m_DefineElement name="catalog_tab">
<inp2:m_if check="m_ParamEquals" name="tab_init" value="">
- <inp2:lang.current_Field name="Charset" result_to_var="charset"/>
- <inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+ <inp2:lang.current_SetContentType content_type="text/plain"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
Index: install/english.lang
===================================================================
--- install/english.lang (revision 15437)
+++ install/english.lang (working copy)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LANGUAGES Version="6">
- <LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" ShortDateFormat="m/d" TimeFormat="g:i A" ShortTimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," Charset="utf-8" UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
+ <LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" ShortDateFormat="m/d" TimeFormat="g:i A" ShortTimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
<EMAILDESIGNS>
<HTML>JGJvZHkNCjxici8+PGJyLz4NCg0KU2luY2VyZWx5LDxici8+PGJyLz4NCg0KV2Vic2l0ZSBhZG1pbmlzdHJhdGlvbi4NCg0KPCEtLSMjIDxpbnAyOmVtYWlsLWxvZ19JdGVtTGluayB0ZW1wbGF0ZT0icGxhdGZvcm0vbXlfYWNjb3VudC9lbWFpbCIvPiAjIy0tPg==</HTML>
</EMAILDESIGNS>
Index: install/step_templates/sys_config.tpl
===================================================================
--- install/step_templates/sys_config.tpl (revision 15437)
+++ install/step_templates/sys_config.tpl (working copy)
@@ -10,6 +10,7 @@
'CacheHandler' => Array ('type' => 'select', 'title' => 'Output Caching Engine', 'section' => 'Misc', 'default' => 'Fake'),
'MemcacheServers' => Array ('type' => 'text', 'title' => 'Location of Memcache Servers', 'section' => 'Misc', 'default' => 'localhost:11211'),
'CompressionEngine' => Array ('type' => 'select', 'title' => 'CSS/JS Compression Engine', 'section' => 'Misc', 'default' => ''),
+ 'WebsiteCharset' => Array ('type' => 'text', 'title' => 'Website Charset', 'section' => 'Misc', 'required' => 1, 'default' => 'utf-8'),
);
$settings['CacheHandler']['options'] = $this->toolkit->getWorkingCacheHandlers();
Index: install/steps_db.xml
===================================================================
--- install/steps_db.xml (revision 15437)
+++ install/steps_db.xml (working copy)
@@ -144,6 +144,10 @@
functionality for CSS / Javascript files. The default value is set to <b>PHP-based</b> if no Java is auto-detected on server-side.
Available options are: None (empty), YUICompressor (Java) (yui) and PHP-based (php) .</p>
+ <p><b><i>Website Charset</i></b> - character encoding that will be used across the website. By default this should be set to UTF-8,
+ but can set to other encoding also (see <a href="http://en.wikipedia.org/wiki/Character_encoding">wikipedia.org</a> options).
+ It's highly recommended to have Website Encoding match the Database Encoding (specified on DB step).</p>
+
<br/>
]]>
</step>
Index: kernel/application.php
===================================================================
--- kernel/application.php (revision 15437)
+++ kernel/application.php (working copy)
@@ -286,6 +286,11 @@
return false;
}
+ if ( preg_match('/utf-8/i', CHARSET) ) {
+ setlocale(LC_ALL, 'en_US.UTF-8');
+ mb_internal_encoding('UTF-8');
+ }
+
$this->isAdmin = kUtil::constOn('ADMIN');
if ( !kUtil::constOn('SKIP_OUT_COMPRESSION') ) {
@@ -396,14 +401,6 @@
$this->SetVar('visits_id', $visit_id);
}
- $language = $this->recallObject('lang.current', null, Array ('live_table' => true));
- /* @var $language LanguagesItem */
-
- if ( preg_match('/utf-8/', $language->GetDBField('Charset')) ) {
- setlocale(LC_ALL, 'en_US.UTF-8');
- mb_internal_encoding('UTF-8');
- }
-
if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->profileFinish('kernel4_startup');
}
@@ -3041,12 +3038,9 @@
*/
public function XMLHeader($xml_version = false)
{
- $lang = $this->recallObject('lang.current');
- /* @var $lang LanguagesItem */
-
$this->setContentType('text/xml');
- return $xml_version ? '<?xml version="' . $xml_version . '" encoding="' . $lang->GetDBField('Charset') . '"?>' : '';
+ return $xml_version ? '<?xml version="' . $xml_version . '" encoding="' . CHARSET . '"?>' : '';
}
/**
@@ -3183,26 +3177,23 @@
*/
public function setContentType($content_type = 'text/html', $include_charset = null)
{
- static $aleady_set = false;
+ static $already_set = false;
- if ( $aleady_set ) {
+ if ( $already_set ) {
return;
}
$header = 'Content-type: ' . $content_type;
if ( !isset($include_charset) ) {
- $include_charset = $content_type = 'text/html' || $content_type = 'text/xml';
+ $include_charset = $content_type = 'text/html' || $content_type == 'text/plain' || $content_type = 'text/xml';
}
if ( $include_charset ) {
- $language = $this->recallObject('lang.current');
- /* @var $language LanguagesItem */
-
- $header .= '; charset=' . $language->GetDBField('Charset');
+ $header .= '; charset=' . CHARSET;
}
- $aleady_set = true;
+ $already_set = true;
header($header);
}
}
\ No newline at end of file
Index: kernel/managers/rewrite_url_processor.php
===================================================================
--- kernel/managers/rewrite_url_processor.php (revision 15437)
+++ kernel/managers/rewrite_url_processor.php (working copy)
@@ -388,7 +388,7 @@
$string = '';
}
- $url_parts = $string ? explode('/', mb_strtolower($string, 'UTF-8')) : Array ();
+ $url_parts = $string ? explode('/', mb_strtolower($string)) : Array ();
$this->_partsToParse = $url_parts;
Index: kernel/startup.php
===================================================================
--- kernel/startup.php (revision 15437)
+++ kernel/startup.php (working copy)
@@ -23,6 +23,9 @@
$vars = kUtil::getConfigVars();
+ $charset = isset($vars['WebsiteCharset']) ? $vars['WebsiteCharset'] : 'utf-8';
+ define('CHARSET', $charset);
+
$admin_directory = isset($vars['AdminDirectory']) ? $vars['AdminDirectory'] : '/admin';
define('ADMIN_DIRECTORY', $admin_directory);
Index: kernel/utility/email_send.php
===================================================================
--- kernel/utility/email_send.php (revision 15437)
+++ kernel/utility/email_send.php (working copy)
@@ -1726,14 +1726,7 @@
*/
function SetCharset($charset, $is_system = false)
{
- if ( $is_system ) {
- $language = $this->Application->recallObject('lang.current');
- /* @var $language LanguagesItem */
-
- $charset = $language->GetDBField('Charset') ? $language->GetDBField('Charset') : 'ISO-8859-1';
- }
-
- $this->charset = $charset;
+ $this->charset = $is_system ? CHARSET : $charset;
}
/**
Index: units/categories/categories_event_handler.php
===================================================================
--- units/categories/categories_event_handler.php (revision 15437)
+++ units/categories/categories_event_handler.php (working copy)
@@ -3009,7 +3009,7 @@
// 1. Set virtual page as template, this will be replaced to physical template later in kApplication::Run.
// 2. Don't set CachedTemplate field as template here, because we will loose original page associated with it's cms blocks!
- $vars['t'] = mb_strtolower( preg_replace('/^Content\//i', '', $last_category_info['NamedParentPath']), 'UTF-8' );
+ $vars['t'] = mb_strtolower( preg_replace('/^Content\//i', '', $last_category_info['NamedParentPath']));
$vars['m_cat_id'] = $last_category_info['CategoryId'];
$vars['is_virtual'] = true; // for template from POST, strange code there!
Index: units/fck/fck_eh.php
===================================================================
--- units/fck/fck_eh.php (revision 15437)
+++ units/fck/fck_eh.php (working copy)
@@ -86,7 +86,7 @@
$templates[$this->Application->getBaseCategory()] .= '/Index'; // "Content" category will act as "Home Page"
- $res = '<?xml version="1.0" encoding="utf-8" ?>' . "\n";
+ $res = '<?xml version="1.0" encoding="' . CHARSET . '" ?>' . "\n";
$res .= '<CmsPages>' . "\n";
foreach ($pages as $id => $title) {
@@ -169,7 +169,7 @@
$fck_helper = $this->Application->recallObject('FCKHelper');
/* @var $fck_helper fckFCKHelper */
- $ret = '<?xml version="1.0" encoding="utf-8" ?>'."\n" ;
+ $ret = '<?xml version="1.0" encoding="' . CHARSET . '" ?>'."\n" ;
$ret .= "<content>"."\n";
$ret .= $fck_helper->PrintFolders();
$ret .= $fck_helper->PrintFiles();
Index: units/helpers/csv_helper.php
===================================================================
--- units/helpers/csv_helper.php (revision 15437)
+++ units/helpers/csv_helper.php (working copy)
@@ -50,11 +50,7 @@
$export_data['enclosure'] = $this->enclosure_mapping[(int)$this->Application->ConfigValue('CSVExportEnclosure')];
$export_data['record_separator'] = $this->separator_mapping[(int)$this->Application->ConfigValue('CSVExportSeparator')];
$export_data['page'] = 1;
-
- $lang_object = $this->Application->recallObject('lang.current');
- /* @var $lang_object LanguagesItem */
-
- $export_data['source_encoding'] = strtoupper($lang_object->GetDBField('Charset'));
+ $export_data['source_encoding'] = strtoupper(CHARSET);
$export_data['encoding'] = $this->Application->ConfigValue('CSVExportEncoding') ? false : 'UTF-16LE';
$this->Application->StoreVar('export_rand', $get_rand);
@@ -185,10 +181,7 @@
if(!file_exists($filename) || !is_file($filename)) return 'cant_open_file';
$import_data = Array();
-
- $lang_object = $this->Application->recallObject('lang.current');
- /* @var $lang_object LanguagesItem */
- $import_data['source_encoding'] = strtoupper( $lang_object->GetDBField('Charset') );
+ $import_data['source_encoding'] = strtoupper(CHARSET);
$import_data['encoding'] = $this->Application->ConfigValue('CSVExportEncoding') ? false : 'UTF-16LE';
$import_data['errors'] = '';
Index: units/helpers/language_import_helper.php
===================================================================
--- units/helpers/language_import_helper.php (revision 15437)
+++ units/helpers/language_import_helper.php (working copy)
@@ -739,8 +739,8 @@
{
return Array (
'PackName', 'LocalName', 'DateFormat', 'ShortDateFormat', 'TimeFormat', 'ShortTimeFormat',
- 'InputDateFormat', 'InputTimeFormat', 'DecimalPoint', 'ThousandSep', 'Charset', 'UnitSystem',
- 'Locale', 'UserDocsUrl'
+ 'InputDateFormat', 'InputTimeFormat', 'DecimalPoint', 'ThousandSep', 'UnitSystem', 'Locale',
+ 'UserDocsUrl'
);
}
@@ -785,7 +785,6 @@
'PackName' => (string)$language_node['PackName'],
'LocalName' => (string)$language_node['PackName'],
'Encoding' => (string)$language_node['Encoding'],
- 'Charset' => 'utf-8',
'SynchronizationModes' => Language::SYNCHRONIZE_DEFAULT,
);
Index: units/helpers/mime_decode_helper.php
===================================================================
--- units/helpers/mime_decode_helper.php (revision 15437)
+++ units/helpers/mime_decode_helper.php (working copy)
@@ -425,27 +425,25 @@
/**
* Converts encoding to one, that site uses
*
- * @param string $from_engoding
+ * @param string $from_encoding
* @param string $text
* @return string
* @author Alex
*/
- function convertEncoding($from_engoding, $text)
+ function convertEncoding($from_encoding, $text)
{
- if (!function_exists('mb_convert_encoding')) {
+ if ( !function_exists('mb_convert_encoding') ) {
// if mbstring extension not installed
return $text;
}
static $to_encoding = false;
- if ($to_encoding === false) {
- $language = $this->Application->recallObject('lang.current');
- /* @var $language LanguagesItem */
- $to_encoding = $language->GetDBField('Charset');
+ if ( $to_encoding === false ) {
+ $to_encoding = CHARSET;
}
- return mb_convert_encoding($text, $to_encoding, $from_engoding);
+ return mb_convert_encoding($text, $to_encoding, $from_encoding);
}
Index: units/languages/languages_config.php
===================================================================
--- units/languages/languages_config.php (revision 15437)
+++ units/languages/languages_config.php (working copy)
@@ -192,7 +192,6 @@
'ShortTimeFormat' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => 'g:i A'),
'DecimalPoint' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => '.'),
'ThousandSep' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
- 'Charset' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => 'utf-8'),
'UnitSystem' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Metric', 2 => 'la_US_UK'), 'use_phrases' => 1,
@@ -227,6 +226,7 @@
),
'VirtualFields' => Array (
+ 'Charset' => Array ('type' => 'string', 'default' => CHARSET), // for backwards compatibility
'CopyLabels' => Array ('type' => 'int', 'default' => 0),
'CopyFromLanguage' => Array (
'type' => 'int',
@@ -249,7 +249,6 @@
'PackName' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ),//
'PrimaryLang' => Array ('title' => 'la_col_IsPrimaryLanguage', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
'AdminInterfaceLang' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ),
- 'Charset' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ),
'Priority' => Array ('filter_block' => 'grid_like_filter', 'width' => 60, ),
'Enabled' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
'SynchronizationModes' => Array ('filter_block' => 'grid_picker_filter', 'width' => 120, 'format' => ', ', 'hidden' => 1),
Index: units/languages/languages_tag_processor.php
===================================================================
--- units/languages/languages_tag_processor.php (revision 15437)
+++ units/languages/languages_tag_processor.php (working copy)
@@ -16,32 +16,21 @@
class LanguagesTagProcessor extends kDBTagProcessor
{
-
/**
- * Guesses what charset should be used:
- * 1. use lang.current_Field field="Charset" by default
- * 2. if using temp tables then use lang_Field field="Charset"
+ * Sets content-type of page
*
* @param Array $params
* @return string
+ * @access protected
*/
- function GetCharset($params)
+ protected function SetContentType($params)
{
- $edit_direct = $this->Application->GetVar('phrases_label');
+ $content_type = isset($params['content_type']) ? $params['content_type'] : 'text/html';
+ $include_charset = isset($params['include_charset']) ? $params['include_charset'] : null;
- $top_prefix = $this->Application->GetTopmostPrefix($this->Prefix);
- if( substr($this->Application->GetVar($top_prefix.'_mode'), 0, 1) == 't' && !$edit_direct )
- {
- $object = $this->getObject($params);
- /* @var $object kDBItem */
+ $this->Application->setContentType($content_type, $include_charset);
- return $object->GetDBField('Charset');
- }
-
- $lang_current = $this->Application->recallObject('lang.current');
- /* @var $lang_current LanguagesItem */
-
- return $lang_current->GetDBField('Charset');
+ return '';
}
/**
Index: units/translator/translator_event_handler.php
===================================================================
--- units/translator/translator_event_handler.php (revision 15437)
+++ units/translator/translator_event_handler.php (working copy)
@@ -110,7 +110,7 @@
$cur_lang->Load($current_lang);
- $translator->SetDBField('Charset', $cur_lang->GetDBField('Charset'));
+ $translator->SetDBField('Charset', CHARSET);
$event->redirect = false;
}
unified_charset_modules.patch [^] (3,944 bytes) 2012-07-13 11:36
[Show Content]
Index: in-bulletin/admin_templates/catalog_tab.tpl
===================================================================
--- in-bulletin/admin_templates/catalog_tab.tpl (revision 15437)
+++ in-bulletin/admin_templates/catalog_tab.tpl (working copy)
@@ -21,8 +21,7 @@
$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
</inp2:m_if>
<inp2:m_else/>
- <inp2:lang.current_Field name="Charset" result_to_var="charset"/>
- <inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+ <inp2:lang.current_SetContentType content_type="text/plain"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
Index: in-commerce/admin_templates/catalog_tab.tpl
===================================================================
--- in-commerce/admin_templates/catalog_tab.tpl (revision 15437)
+++ in-commerce/admin_templates/catalog_tab.tpl (working copy)
@@ -60,8 +60,7 @@
$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
</inp2:m_if>
<inp2:m_else/>
- <inp2:lang.current_Field name="Charset" result_to_var="charset"/>
- <inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+ <inp2:lang.current_SetContentType content_type="text/plain"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
Index: in-commerce/admin_templates/products/products_pricing_grid.tpl
===================================================================
--- in-commerce/admin_templates/products/products_pricing_grid.tpl (revision 15437)
+++ in-commerce/admin_templates/products/products_pricing_grid.tpl (working copy)
@@ -3,8 +3,7 @@
<div id="<inp2:m_param name="item_prefix"/>_div" prefix="<inp2:m_param name="item_prefix"/>" group_id="-1"></div>
<script type="text/javascript">$BracketManager.registerTab('<inp2:m_param name="item_prefix"/>');</script>
<inp2:m_else/>
- <inp2:lang.current_Field name="Charset" result_to_var="charset"/>
- <inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+ <inp2:lang.current_SetContentType content_type="text/plain"/>
if ($request_visible) {
document.getElementById('<inp2:m_get name="item_prefix"/>_div').setAttribute('group_id', <inp2:m_get name="group_id"/>);
maximizeElement( jq('#<inp2:m_get name="item_prefix"/>_div') );
Index: in-link/admin_templates/catalog_tab.tpl
===================================================================
--- in-link/admin_templates/catalog_tab.tpl (revision 15437)
+++ in-link/admin_templates/catalog_tab.tpl (working copy)
@@ -21,8 +21,7 @@
$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
</inp2:m_if>
<inp2:m_else/>
- <inp2:lang.current_Field name="Charset" result_to_var="charset"/>
- <inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+ <inp2:lang.current_SetContentType content_type="text/plain"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
Index: in-news/admin_templates/catalog_tab.tpl
===================================================================
--- in-news/admin_templates/catalog_tab.tpl (revision 15437)
+++ in-news/admin_templates/catalog_tab.tpl (working copy)
@@ -21,8 +21,7 @@
$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
</inp2:m_if>
<inp2:m_else/>
- <inp2:lang.current_Field name="Charset" result_to_var="charset"/>
- <inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+ <inp2:lang.current_SetContentType content_type="text/plain"/>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_include t="categories/ci_blocks"/>
unified_charset_themes.patch [^] (3,374 bytes) 2012-07-13 11:36
[Show Content]
Index: advanced/platform/designs/popup_design.des.tpl
===================================================================
--- advanced/platform/designs/popup_design.des.tpl (revision 15437)
+++ advanced/platform/designs/popup_design.des.tpl (working copy)
@@ -8,7 +8,7 @@
<title>
<inp2:m_GetConfig name="Site_Name"/>
</title>
- <meta http-equiv="Content-Type" content="text/html; charset=<inp2:lang.current_Field name="Charset"/>" />
+ <meta http-equiv="Content-Type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>" />
<inp2:m_ModuleInclude template="elements/html_head.elm" in-portal_template="platform/elements/html_head.elm"/>
</head>
<body>
Index: advanced/platform/elements/html_head.elm.tpl
===================================================================
--- advanced/platform/elements/html_head.elm.tpl (revision 15437)
+++ advanced/platform/elements/html_head.elm.tpl (working copy)
@@ -1,6 +1,6 @@
<!--## Meta Info (Keywords and Description) ##-->
-<meta http-equiv="Content-Type" content="text/html; charset=<inp2:lang.current_Field name='Charset'/>" />
+<meta http-equiv="Content-Type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>" />
<link rel="icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
Index: default/elements/html_head.elm.tpl
===================================================================
--- default/elements/html_head.elm.tpl (revision 15437)
+++ default/elements/html_head.elm.tpl (working copy)
@@ -9,13 +9,13 @@
<meta name="Description" content="<inp2:m_GetConfig name='Category_MetaDesc'/>"/>
</inp2:m_if>
<meta name="author" content="<inp2:m_GetConfig name='Site_Name' html_escape='1'/>"/>
-<meta http-equiv="content-type" content="text/html; charset=<inp2:lang.current_Field name='Charset'/>" />
+<meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>" />
<link rel="icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
<!-- CSS -->
-<link rel="stylesheet" type="text/css" href="<inp2:m_Compress files='inc/reset.css|inc/styles.css'/>" media="screen" charset="<inp2:lang.current_Field name='Charset'/>"/>
+<link rel="stylesheet" type="text/css" href="<inp2:m_Compress files='inc/reset.css|inc/styles.css'/>" media="screen" charset="<inp2:m_GetConst name='CHARSET'/>"/>
<!-- JS FOR ADMIN -->
<inp2:st_EditingScripts/>
Index: simple/elements/html_head.elm.tpl
===================================================================
--- simple/elements/html_head.elm.tpl (revision 15437)
+++ simple/elements/html_head.elm.tpl (working copy)
@@ -9,7 +9,7 @@
<meta name="Description" content="<inp2:m_GetConfig name='Category_MetaDesc'/>"/>
</inp2:m_if>
<meta name="author" content="<inp2:m_GetConfig name='Site_Name' html_escape='1'/>"/>
-<meta http-equiv="content-type" content="text/html; charset=<inp2:lang.current_Field name='Charset'/>" />
+<meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>" />
<link rel="icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
|