From 96857da41f5894f0ddfb2d11e9ca9804cb4b0de1 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 31 Oct 2007 10:11:30 +0000 Subject: [PATCH] Fixed errors if default language wasn't sent in header git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7698 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/accept-to-gettext.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/accept-to-gettext.inc b/include/accept-to-gettext.inc index 7d39ecf93..621863cb1 100644 --- a/include/accept-to-gettext.inc +++ b/include/accept-to-gettext.inc @@ -194,15 +194,14 @@ function al2gt($gettextlangs, $mime) /* We must re-parse the gettext-string now, since we may have found it * through a "*" qualifier.*/ - $gtparts=@preg_split("/\./",$curgtlang); $tmp=strtolower($gtparts[0]); $lang=preg_replace("/\_/", "-", $tmp); - $charset=$gtparts[1]; - header("Content-Language: $lang"); - header("Content-Type: $mime; charset=$charset"); - + if(isset($gtparts[1])){ + $charset=$gtparts[1]; + header("Content-Type: $mime; charset=$charset"); + } return $curgtlang; } -- 2.30.2