From: hickert Date: Wed, 14 Jul 2010 13:27:08 +0000 (+0000) Subject: Updated post handling for fax classes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4426d7d66842399420cfa8c10ff0acaef4022cea;p=gosa.git Updated post handling for fax classes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19013 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc index ded4f5494..512422938 100644 --- a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc +++ b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc @@ -132,7 +132,7 @@ class blocklistGeneric extends plugin $smarty = get_smarty(); foreach($this->attributes as $name){ - $smarty->assign($name,$this->$name); + $smarty->assign($name,set_post($this->$name)); } $tmp = $this->plInfo(); foreach($tmp['plProvidedAcls'] as $name => $translation){ @@ -145,12 +145,12 @@ class blocklistGeneric extends plugin $smarty->assign("goFaxBlocklistACL", $this->getacl('goFaxRBlocklist')); } - $smarty->assign("goFaxBlocklist",$this->goFaxBlocklist); + $smarty->assign("goFaxBlocklist", set_post($this->goFaxBlocklist)); $smarty->assign("cnACL",$this->getacl("cn",$this->readonly)); $smarty->assign("typeACL",$this->getacl("type",$this->readonly)); $smarty->assign("base", $this->baseSelector->render()); $smarty->assign("types", array(BLOCK_LIST_SEND => _("send"), BLOCK_LIST_RECEIVE => _("receive"))); - $smarty->assign("type", $this->type); + $smarty->assign("type", set_post($this->type)); $smarty->assign("dn", $this->dn); $smarty->assign("read_only",$this->read_only); return($smarty->fetch(get_template_path('generic.tpl', TRUE))); @@ -182,7 +182,7 @@ class blocklistGeneric extends plugin if(in_array($attr,array("cn","type")) && $this->readonly){ continue; }elseif(isset($_POST[$attr]) && $this->acl_is_writeable($attr)){ - $this->$attr = $_POST[$attr]; + $this->$attr = get_post($attr); } } } @@ -312,7 +312,7 @@ class blocklistGeneric 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,dirname(__FILE__))); $ret = array(); $ret['string'] = $str; diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc index e4dff7992..7b8ebebef 100644 --- a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc +++ b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc @@ -435,8 +435,7 @@ class gofaxAccount extends plugin /* Show dialog */ - $smarty->assign("cblocklist", $this->current_blocklist); - $smarty->assign("departments", $this->config->idepartments); + $smarty->assign("cblocklist", set_post($this->current_blocklist)); $smarty->assign("predefinedList", $this->predefinedList->render()); $display.= $smarty->fetch (get_template_path('lists.tpl', TRUE, dirname(__FILE__))); return ($display); @@ -516,8 +515,7 @@ class gofaxAccount extends plugin $this->predefinedList->update(); /* Show dialog */ - $smarty->assign("cblocklist", $this->current_blocklist); - $smarty->assign("departments", $this->config->idepartments); + $smarty->assign("cblocklist", set_post($this->current_blocklist)); $smarty->assign("predefinedList", $this->predefinedList->render()); $display.= $smarty->fetch (get_template_path('lists.tpl', TRUE, dirname(__FILE__))); return ($display); @@ -526,16 +524,15 @@ class gofaxAccount extends plugin /* Show main page */ $smarty->assign("languages", get_languages(TRUE)); - - $smarty->assign("formats", $this->fax_formats); - $smarty->assign("printers", $this->printerList); + $smarty->assign("formats", set_post($this->fax_formats)); + $smarty->assign("printers", set_post($this->printerList)); /* Load attributes */ foreach(array("goFaxIsEnabled", "goFaxDeliveryMode", "facsimileTelephoneNumber", "goFaxPrinter", "goFaxLanguage", "goFaxFormat", "facsimileAlternateTelephoneNumber", "mail") as $val){ - $smarty->assign("$val", $this->$val); + $smarty->assign("$val", set_post($this->$val)); } $tmp = $this->plInfo(); @@ -683,7 +680,7 @@ class gofaxAccount extends plugin if (isset($_POST['mail']) && $this->acl_is_writeable("faxtomail",$edit_mode)){ - $this->mail= $_POST['mail']; + $this->mail= get_post('mail'); } /* Check if mail account is active and correct the internal @@ -790,7 +787,7 @@ class gofaxAccount extends plugin { $str = ""; $smarty = get_smarty(); - $smarty->assign("facsimileTelephoneNumber", $this->facsimileTelephoneNumber); + $smarty->assign("facsimileTelephoneNumber", set_post($this->facsimileTelephoneNumber)); $str['string'] = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE,dirname(__FILE__))); $str['status'] =""; return($str); @@ -799,7 +796,7 @@ class gofaxAccount extends plugin function SaveCopyDialog() { if(isset($_POST['facsimileTelephoneNumber'])){ - $this->facsimileTelephoneNumber = $_POST['facsimileTelephoneNumber']; + $this->facsimileTelephoneNumber = get_post('facsimileTelephoneNumber'); } } @@ -877,7 +874,7 @@ class gofaxAccount extends plugin $this->goFaxIsEnabled= "1"; } if (isset($_POST['mail']) && in_array("mail",$this->multi_boxes)){ - $this->mail= $_POST['mail']; + $this->mail= get_post('mail'); } } } diff --git a/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc b/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc index ee78cb718..cbbbcfcab 100644 --- a/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc +++ b/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc @@ -106,7 +106,7 @@ class faxreport extends plugin // Set smarty defaults $smarty= get_smarty(); - $smarty->assign("search_for" , $this->search_for); + $smarty->assign("search_for" , set_post($this->search_for)); $smarty->assign("months" , $months); $smarty->assign("month_select" , $this->month); $smarty->assign("years" , $years); @@ -194,15 +194,15 @@ class faxreport extends plugin $final="fax_$vname"; $v_acl = $this->ui->get_permissions($dn,"users/viewFaxEntries",preg_replace("/_/","",$vname)); if($line[$vname] != "" && preg_match("/r/i", $v_acl)){ - $smarty->assign("$final", $line[$vname]); + $smarty->assign("$final", set_post($line[$vname])); } else { $smarty->assign("$final", "-"); } } $format= _("Y-M-D"); $queuing_time= $line['queuing_time']; - $smarty->assign("plug", "?plug=".validate($_GET['plug'])); - $smarty->assign("detail", validate($detail)); + $smarty->assign("plug", "?plug=".get_post('plug')); + $smarty->assign("detail", set_post(get_post($detail))); $date= preg_replace("/Y/", substr($queuing_time,0,4), $format); $date= preg_replace("/M/", substr($queuing_time,4,2), $date); $date= preg_replace("/D/", substr($queuing_time,6,2), $date); @@ -384,7 +384,7 @@ class faxreport extends plugin { $faxreportfilter = session::get("faxreportfilter"); if(isset($_POST['EntriesPerPage'])){ - $this->range = $_POST['EntriesPerPage']; + $this->range = get_post('EntriesPerPage'); } if (isset($_GET['start'])){ @@ -407,7 +407,7 @@ class faxreport extends plugin } foreach( array("year", "month", "search_for") as $type){ if (isset($_POST[$type])){ - $faxreportfilter[$type]= $_POST[$type]; + $faxreportfilter[$type]= get_post($type); /* reset start page, if filter has changed */ if(!isset($_GET['start'])){