From c1812e769e65565e9d2c3ccb0d4ec6170997034d Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 22 Jun 2005 09:15:35 +0000 Subject: [PATCH] added some checks git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@797 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/macro/class_gofonMacroParameters.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc index 67f8bce06..d8e5d6992 100755 --- a/plugins/gofon/macro/class_gofonMacroParameters.inc +++ b/plugins/gofon/macro/class_gofonMacroParameters.inc @@ -251,6 +251,20 @@ class macroParameter extends plugin return(array($str)); } } + foreach($this->goFonMacroParameter as $key=>$val){ + switch($val['type']){ + case 'bool' : $possible = array("","0","1","true","false"); + if(!in_array($val['default'],$possible)) { + $message[] = sprintf(_("The parameter %s has incorrect value for type bool."),$val['name']); + };break; + case 'string' : + case 'combo' : if(strstr($val['default'],"!")){ + $message[] = sprintf(_("The parameter %s contains invalid char. '!' is used as delimiter"),$val['name']); + };break; + default : ; + + } + } return $message; } -- 2.30.2