Code

Set missing values instead of using error_reporting(0)
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Aug 2007 12:58:03 +0000 (12:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Aug 2007 12:58:03 +0000 (12:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7050 594d385d-05f5-0310-b6e9-bd551577e9d8

include/accept-to-gettext.inc

index 6bf1950e6a1d863becd917306d4ee0cfd7042da7..a108cc21c044f5968e87f32f042dde8ec372efc5 100644 (file)
@@ -86,7 +86,6 @@ function find_match($curlscore,$curcscore,$curgtlang,$langval,$charval,
 
 function al2gt($gettextlangs, $mime) 
 {
-  error_reporting(0);
 
   /* Try to use users primary language */
   $ui= get_userinfo();
@@ -158,6 +157,18 @@ function al2gt($gettextlangs, $mime)
     $gtcs=strtoupper($tmp2[1]);
     $noct=@preg_split("/-/",$allang);
 
+    if(!isset($alscores["*"])){
+      $alscores["*"] = "";
+    }
+
+    if(!isset($alscores[$allang])){
+      $alscores[$allang] = "";
+    }
+    
+    if(!isset($alscores[$noct[0]])){
+      $alscores[$noct[0]] = "";
+    }
+  
     $testvals=array(
         array($alscores[$allang], $acscores[$gtcs]),
         array($alscores[$noct[0]], $acscores[$gtcs]),
@@ -190,7 +201,6 @@ function al2gt($gettextlangs, $mime)
   header("Content-Language: $lang");
   header("Content-Type: $mime; charset=$charset");
 
-  error_reporting(E_ALL);
   return $curgtlang;
 }