Code

Updated several service dialogs, fixed typos, string, html, post handling and more.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Jul 2010 15:47:25 +0000 (15:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Jul 2010 15:47:25 +0000 (15:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19139 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/admin/systems/services/spam/class_goSpamServerRule.inc

index 37ca7addafe99f8d53cca03c23a286545a91089a..3f6a4e72161d31019e055919508f14b21e02fa38 100644 (file)
@@ -1,68 +1,68 @@
 <?php
 class goSpamServerRule extends plugin {
 
-       var $attributes = array("name","rule");
-       var $name = "";
-       var $rule = "";
-       
-       var $orig_name = "";
-  var $view_logged  =FALSE;
-       
-       function goSpamServerRule(&$config,$dn,$name = "",$rule ="")
-       {
-               plugin::plugin($config,$dn);
-               $this->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:
 ?>