Skip to content
Snippets Groups Projects
Commit 6bdd8d84 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #2555 from t-oster/feature-fix-headers


Send header information before output. Fixes #2554

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents d1388ae6 34256e50
No related branches found
No related tags found
No related merge requests found
......@@ -6,18 +6,20 @@ $signin_url = ROOT_PATH . "login.php"
$signout_url = ROOT_PATH . "logout.php?auth=".$ost->getLinkToken();
header("Content-Type: text/html; charset=UTF-8");
if (($lang = Internationalization::getCurrentLanguage())) {
$langs = array_unique(array($lang, $cfg->getPrimaryLanguage()));
$langs = Internationalization::rfc1766($langs);
header("Content-Language: ".implode(', ', $langs));
}
?>
<!DOCTYPE html>
<html<?php
if (($lang = Internationalization::getCurrentLanguage())
if ($lang
&& ($info = Internationalization::getLanguageInfo($lang))
&& (@$info['direction'] == 'rtl'))
echo ' dir="rtl" class="rtl"';
if ($lang) {
$langs = array_unique(array($lang, $cfg->getPrimaryLanguage()));
$langs = Internationalization::rfc1766($langs);
echo ' lang="' . $lang . '"';
header("Content-Language: ".implode(', ', $langs));
}
?>>
<head>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment