From 073d385a9b110ead4c4d15f46404be613e4df4c3 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 26 Jul 2010 15:47:25 +0000 Subject: [PATCH] Updated several service dialogs, fixed typos, string, html, post handling and more. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19139 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../services/spam/class_goSpamServerRule.inc | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServerRule.inc b/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServerRule.inc index 37ca7adda..3f6a4e721 100644 --- a/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServerRule.inc +++ b/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServerRule.inc @@ -1,68 +1,68 @@ name = $this->orig_name= $name; - $this->rule = $rule; - } + var $attributes = array("name","rule"); + var $name = ""; + var $rule = ""; + var $orig_name = ""; + var $view_logged =FALSE; - function execute() - { - plugin::execute(); + function goSpamServerRule(&$config,$dn,$name = "",$rule ="") + { + plugin::plugin($config,$dn); + $this->name = $this->orig_name= $name; + $this->rule = $rule; + } + + + function execute() + { + plugin::execute(); + + $smarty = get_smarty(); - $smarty = get_smarty(); + if($this->is_account && !$this->view_logged){ + $this->view_logged = TRUE; + new log("view","server/".get_class($this),$this->dn); + } - if($this->is_account && !$this->view_logged){ - $this->view_logged = TRUE; - new log("view","server/".get_class($this),$this->dn); + foreach($this->attributes as $attr){ + $smarty->assign($attr,set_post($this->$attr)); + } + return($smarty->fetch(get_template_path("goSpamServerRule.tpl",TRUE,dirname(__FILE__)))); } - foreach($this->attributes as $attr){ - $smarty->assign($attr,$this->$attr); - } - return($smarty->fetch(get_template_path("goSpamServerRule.tpl",TRUE,dirname(__FILE__)))); - } + function save_object() + { + foreach($this->attributes as $attr){ + if(isset($_POST[$attr])){ + $this->$attr = get_post($attr); + } + } + } - function save_object() - { - foreach($this->attributes as $attr){ - if(isset($_POST[$attr])){ - $this->$attr = $_POST[$attr]; - } - } - } + function acl_is_writeable($attribute,$skip_write = FALSE) + { + if($this->read_only) return(FALSE); + $ui= get_userinfo(); + return preg_match('/w/', $ui->get_permissions($this->acl_base, $this->acl_category."gospamserver", $attribute, $skip_write)); + } - function acl_is_writeable($attribute,$skip_write = FALSE) - { - if($this->read_only) return(FALSE); - $ui= get_userinfo(); - return preg_match('/w/', $ui->get_permissions($this->acl_base, $this->acl_category."gospamserver", $attribute, $skip_write)); - } + function save() + { + $ret =array(); + $ret['orig_name'] = $this->orig_name; + $ret['name'] = $this->name; + $ret['rule'] = $this->rule; + return($ret); + } - function save() - { - $ret =array(); - $ret['orig_name'] = $this->orig_name; - $ret['name'] = $this->name; - $ret['rule'] = $this->rule; - return($ret); - } - - function check() - { - $messages = plugin::check(); - return($messages); - } + function check() + { + $messages = plugin::check(); + return($messages); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> -- 2.30.2