Code

Updated workstation - Startup
[gosa.git] / plugins / admin / systems / class_goSpamServer.inc
index 77b7d0d9a1090a9b6d166f66ec923642dd94d007..e62bb401be229d9575c75890ed13e2342fb01ca9 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-require_once("class_goService.inc");
-
 class gospamserver extends goService{
 
   /* CLI vars */
@@ -38,14 +36,14 @@ class gospamserver extends goService{
   var $saFlagsD         = false;
   var $saFlagsP         = false;
  
-  var $dialog           = NULL;
   var $ui               = NULL;
   var $acl              = NULL;
+  var $view_logged  =FALSE;
 
-  function gospamserver($config,$dn, $parent= NULL)
+  function gospamserver(&$config,$dn, $parent= NULL)
   {
     /* Init class */
-    plugin::plugin($config,$dn, $parent);
+    goService::goService($config,$dn, $parent);
     $this->DisplayName = _("Spamassassin");
 
     /* Get userinfo & acls */
@@ -88,6 +86,11 @@ class gospamserver extends goService{
     $display ="";
     $smarty = get_smarty(); 
     
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      new log("view","server/".get_class($this),$this->dn);
+    }
+
     /* If displayed, it is ever true*/
     $this->is_account =true;
 
@@ -114,7 +117,7 @@ class gospamserver extends goService{
   
     /* Cancel adding/editing specified rule */
     if(isset($_POST['CancelRule'])){
-      $this->dialog = NULL;
+      $this->dialog = FALSE;
     }
 
     /* Handle post to delete rules */
@@ -150,7 +153,7 @@ class gospamserver extends goService{
           unset($this->Rules[$ret['orig_name']]);
         }
         $this->Rules[$ret['name']] = $ret['rule'];
-        $this->dialog = NULL;
+        $this->dialog = FALSE;
       }
     }
    
@@ -270,8 +273,10 @@ class gospamserver extends goService{
     }
     if($this->initially_was_account){
       $this->handle_post_events("modify");
+      new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }else{
       $this->handle_post_events("add");
+      new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }
 
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/spamassassin with dn '%s' failed."),$this->dn));
@@ -317,10 +322,10 @@ class gospamserver extends goService{
   {
     return (array(
           "plShortName"   => _("Spamassassin"),
-          "plDescription" => _("Spamassassin service"),
+          "plDescription" => _("Spamassassin")." ("._("Services").")",
           "plSelfModify"  => FALSE,
           "plDepends"     => array(),
-          "plPriority"    => 0,
+          "plPriority"    => 89,
           "plSection"     => array("administration"),
           "plCategory"    => array("server"),
           "plProvidedAcls"=> array(