From: hickert Date: Mon, 26 Jun 2006 08:34:10 +0000 (+0000) Subject: Added config true/false detection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=83974ace99cbae72524400ca2c9f2699d3f2465c;p=gosa.git Added config true/false detection git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3893 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_config.inc b/include/class_config.inc index e84d684b5..879039f4b 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -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]){