From: hickert Date: Wed, 22 Jun 2005 08:53:36 +0000 (+0000) Subject: added realname for Parameter X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3f85e99f8ed66a54f2c13ed21ddddbaebce4cbdf;p=gosa.git added realname for Parameter git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@795 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc index 65f6614ca..67f8bce06 100755 --- a/plugins/gofon/macro/class_gofonMacroParameters.inc +++ b/plugins/gofon/macro/class_gofonMacroParameters.inc @@ -62,9 +62,10 @@ class macroParameter extends plugin foreach($this->goFonMacroParameter as $para){ $tmp = split("!",$para); $num = preg_replace("/[^0-9]/","",$tmp[1]); - $tmp2[$num]['name'] = $tmp[1]; - $tmp2[$num]['type'] = $tmp[2]; - $tmp2[$num]['default'] = $tmp[3]; + $tmp2[$num]['var'] = $tmp[1]; + $tmp2[$num]['name'] = $tmp[2]; + $tmp2[$num]['type'] = $tmp[3]; + $tmp2[$num]['default'] = $tmp[4]; } /* Assign this array */ @@ -92,6 +93,7 @@ class macroParameter extends plugin } } foreach($new as $key => $val){ + $goFonMacroParameter[$key]['var']="\${ARG".$key."}"; $goFonMacroParameter[$key]['check']= true; if((!isset($goFonMacroParameter[$key]['name']))||(empty($goFonMacroParameter[$key]['name']))){ $goFonMacroParameter[$key]['name']="\${ARG".$key."}"; @@ -150,7 +152,7 @@ class macroParameter extends plugin } $number= count($this->goFonMacroParameter); $number++; - $this->goFonMacroParameter[]=array("name"=>"new","type"=>"string","default"=>"test"); + $this->goFonMacroParameter[]=array("var"=>"var","name"=>"new","type"=>"string","default"=>"test"); } /*generate Table which shows als parameters */ @@ -168,8 +170,9 @@ class macroParameter extends plugin /* Assemble output table */ $vars .=" - - ".$para['name']." + + ".$para['var']." + "; if($para['check']==true) { - $vars.=_("Ok"); - $vars.=" "; + $vars.=""; }else{ - $vars.=""._("Unused").""; + $vars.=""._("Unused").""; $vars.=" "; } @@ -227,6 +229,8 @@ class macroParameter extends plugin /* Set Post vars */ $key = $_POST[$name]; + + $this->goFonMacroParameter[$key]['var'] = $_POST["var".$key]; $this->goFonMacroParameter[$key]['name'] = $_POST["varname".$key]; $this->goFonMacroParameter[$key]['type'] = $_POST["vartype".$key]; $this->goFonMacroParameter[$key]['default']= $_POST["default".$key]; @@ -261,7 +265,7 @@ class macroParameter extends plugin $this->attrs['goFonMacroParameter']=array(); foreach($this->goFonMacroParameter as $key=>$fonpara){ - $this->attrs['goFonMacroParameter'][]=$key."!".$fonpara['name']."!".$fonpara['type']."!".$fonpara['default']; + $this->attrs['goFonMacroParameter'][]=$key."!".$fonpara['var']."!".$fonpara['name']."!".$fonpara['type']."!".$fonpara['default']; } unset($this->attrs['base']);