From: hickert Date: Wed, 14 Jul 2010 08:51:26 +0000 (+0000) Subject: Updated Post handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e114c9cbfc301c3b5acf375e67fd1a8d213c037d;p=gosa.git Updated Post handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19008 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc index 2c6b5249e..f2caa10e3 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc @@ -106,7 +106,6 @@ class macro extends plugin } /* Variables */ - $vars = ""; $tmp = array(); $number = 0; @@ -128,14 +127,11 @@ class macro extends plugin /* Assign all vars to Smarty */ foreach($this->attributes as $ar){ - $smarty->assign($ar, $this->$ar); + $smarty->assign($ar, set_post($this->$ar)); } $smarty->assign("base", $this->baseSelector->render()); - /* Checkboxes */ - $smarty->assign("vars", $vars); - if($this->goFonMacroVisible){ $smarty->assign("goFonMacroVisibleChecked"," checked "); }else{ @@ -143,10 +139,10 @@ class macro extends plugin } $smarty->assign("cnACL",$this->getacl("cn",$this->initially_was_account)); - $smarty->assign("cn",$this->cn); + $smarty->assign("cn",set_post($this->cn)); /* Ensure that macro content is displayed correctly encoded */ - $smarty->assign("goFonMacroContent",htmlentities(utf8_decode ($this->goFonMacroContent))); + $smarty->assign("goFonMacroContent",set_post($this->goFonMacroContent)); /* Show main page */ return($smarty->fetch (get_template_path('generic.tpl', TRUE))); @@ -552,7 +548,7 @@ class macro extends plugin function getCopyDialog() { $smarty = get_smarty(); - $smarty->assign("cn" ,$this->cn); + $smarty->assign("cn" ,set_post($this->cn)); $str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE)); $ret = array(); $ret['string'] = $str; @@ -564,7 +560,7 @@ class macro extends plugin function saveCopyDialog() { if(isset($_POST['cn'])){ - $this->cn = $_POST['cn']; + $this->cn = get_post('cn'); } } diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc index b93b96655..7f65532ea 100644 --- a/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc +++ b/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc @@ -247,9 +247,9 @@ class macroParameter extends plugin $vars .=" - ARG".$key." + ARG".$key." - + - +  "; if($para['check']==false) { $vars.=""; @@ -311,12 +311,12 @@ class macroParameter extends plugin }elseif(preg_match("/^number/",$name)){ /* Set Post vars */ - $key = $_POST[$name]; + $key = get_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]; + $this->goFonMacroParameter[$key]['var'] = get_post("var".$key); + $this->goFonMacroParameter[$key]['name'] = get_post("varname".$key); + $this->goFonMacroParameter[$key]['type'] = get_post("vartype".$key); + $this->goFonMacroParameter[$key]['default']= get_post("default".$key); } }