From 7736957442e464ad66415e458330b9da6c47ae23 Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Thu, 16 Jul 2015 11:31:41 +0200 Subject: [PATCH] xhtml application when managed by server Signed-off-by: Jerome Jutteau --- lib/template/header.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/template/header.php b/lib/template/header.php index 91f857e..dd7ec3c 100644 --- a/lib/template/header.php +++ b/lib/template/header.php @@ -3,6 +3,9 @@ header('Vary: Accept'); $content_type = 'text/html; charset=utf-8'; +if (stristr ($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml')) + $content_type = 'application/xhtml+xml; charset=utf-8'; + header('Content-Type: ' . $content_type); $protocol = (bool)is_ssl() ? 'https' : 'http'; @@ -22,10 +25,22 @@ if (!isset ($cfg['style'])) else $style = $cfg['style']; - +if (stristr ($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml')) +{ +?> + + + + <?php echo t('Jirafeau, your web file repository'); ?> -- 2.34.1