Code

Added config true/false detection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Jun 2006 08:34:10 +0000 (08:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Jun 2006 08:34:10 +0000 (08:34 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3893 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_config.inc

index e84d684b5df640e598b98cd147eb809985089c78..879039f4b3d2c1f0cb5bf3fa3730779d072d0439 100644 (file)
@@ -91,6 +91,15 @@ class config  {
       return;
     }
 
+    /* yes/no to true/false and upper case TRUE to true and so on*/
+    foreach($attrs as $name => $value){
+      if(preg_match("/^(true|yes)$/i",$value)){
+        $attrs[$name] = "true";
+      }elseif(preg_match("/^(false|no)$/i",$value)){
+        $attrs[$name] = "false";
+      } 
+    }
+
     /* Look through attributes */
     switch ($this->tags[$this->level-1]){