From 83974ace99cbae72524400ca2c9f2699d3f2465c Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 26 Jun 2006 08:34:10 +0000 Subject: [PATCH] Added config true/false detection git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3893 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_config.inc | 9 +++++++++ 1 file changed, 9 insertions(+) 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]){ -- 2.30.2