From: hickert Date: Wed, 31 Oct 2007 10:11:30 +0000 (+0000) Subject: Fixed errors if default language wasn't sent in header X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=96857da41f5894f0ddfb2d11e9ca9804cb4b0de1;p=gosa.git 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 --- 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; }