* @param string $page_type\r
* @param string $charset Deprecated. This has no meaning.\r
*/\r
- function sendContentType($content_type, $page_type = '', $charset = _CHARSET)\r
+ function sendContentType($content_type, $page_type = '', $charset = '')\r
{\r
global $manager, $CONF;\r
- \r
+\r
+ if ( empty($charset) )\r
+ {\r
+ $charset = i18n::get_current_charset();\r
+ }\r
if ( !headers_sent() )\r
{\r
// if content type is application/xhtml+xml, only send it to browsers\r
'PreSendContentType',\r
array(\r
'contentType' => &$content_type,\r
- 'charset' => i18n::get_current_charset(),\r
+ 'charset' => $charset,\r
'pageType' => $page_type\r
)\r
);\r
\r
// strip strange characters\r
$content_type = preg_replace('|[^a-z0-9-+./]|i', '', $content_type);\r
- header('Content-Type: ' . $content_type . '; charset=' . i18n::get_current_charset());\r
+ header('Content-Type: ' . $content_type . '; charset=' . $charset);\r
} // end if\r
\r
}\r