Skip to content
Snippets Groups Projects
Commit 34256e50 authored by Thomas Oster's avatar Thomas Oster
Browse files

Send header information before output. Fixes #2554

parent b528df56
No related branches found
No related tags found
No related merge requests found
...@@ -6,18 +6,20 @@ $signin_url = ROOT_PATH . "login.php" ...@@ -6,18 +6,20 @@ $signin_url = ROOT_PATH . "login.php"
$signout_url = ROOT_PATH . "logout.php?auth=".$ost->getLinkToken(); $signout_url = ROOT_PATH . "logout.php?auth=".$ost->getLinkToken();
header("Content-Type: text/html; charset=UTF-8"); 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> <!DOCTYPE html>
<html<?php <html<?php
if (($lang = Internationalization::getCurrentLanguage()) if ($lang
&& ($info = Internationalization::getLanguageInfo($lang)) && ($info = Internationalization::getLanguageInfo($lang))
&& (@$info['direction'] == 'rtl')) && (@$info['direction'] == 'rtl'))
echo ' dir="rtl" class="rtl"'; echo ' dir="rtl" class="rtl"';
if ($lang) { if ($lang) {
$langs = array_unique(array($lang, $cfg->getPrimaryLanguage()));
$langs = Internationalization::rfc1766($langs);
echo ' lang="' . $lang . '"'; echo ' lang="' . $lang . '"';
header("Content-Language: ".implode(', ', $langs));
} }
?>> ?>>
<head> <head>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment