diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc
index dd2c2be08cf8646f8af5eda5ff6cb82228a642c2..19085a904b758a40a356499e508cff574633ff9d 100755 (executable)
/*! CLI vars */
var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
+ /* Parameter Count*/
+ var $para_count = 0 ;
/*! macro base */
var $base= "";
foreach($this->goFonMacroParameter as $para){
$tmp = split("!",$para);
$num = $tmp[0];
- $tmp2[$num]['name'] = $tmp[1];
+ $tmp2[$num]['name'] = base64_decode($tmp[1]);
$tmp2[$num]['type'] = $tmp[2];
$tmp2[$num]['default'] = $tmp[3];
$tmp2[$num]['var'] = "var".$num;
}
+
/* Assign this array */
$this->goFonMacroParameter = $tmp2;
+
+ $this->para_count = count ($tmp2);
+
}
//! Perform Parameter check
*/
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
/* Variables */
$vars = "";
$tmp = array();
$number = 0;
-
+
$content = $_SESSION['macroManagment']->macrotabs->by_object['macro']->goFonMacroContent;
if(strstr($content,"ARG")){
$this->attrs['goFonMacroParameter']=array();
foreach($this->goFonMacroParameter as $key=>$fonpara){
- $this->attrs['goFonMacroParameter'][]=$key."!".$fonpara['name']."!".$fonpara['type']."!".$fonpara['default'];
+ $this->attrs['goFonMacroParameter'][]=$key."!".base64_encode($fonpara['name'])."!".$fonpara['type']."!".$fonpara['default'];
+ }
+
+ if($this->para_count != count($this->attrs['goFonMacroParameter'])){
+ print_red(_("Parameter count of the macro changed, you must update each user which are using this macro '%s'."),$this->dn);
}
unset($this->attrs['base']);