Code

Fixed problem with not clickable buttons in fai package error msgs
[gosa.git] / plugins / admin / fai / class_faiScript.inc
index edb3a03c8f25c5a2dd521abfc325d9f6559ed1af..72f2d200960839c07a626ddff540f3ac68a8d5e3 100644 (file)
@@ -38,6 +38,7 @@ class faiScript extends plugin
 
   var $FAIstate         ="";
 
+  var $view_logged = FALSE;
   var $ui;
 
   function faiScript ($config, $dn= NULL)
@@ -85,7 +86,6 @@ class faiScript extends plugin
         $this->SubObjects[$objects['cn']] = $objects;
       }
     
-      @log::log("view","fai/".get_class($this),$this->dn);
     }
     $this->ui = get_userinfo();
   }
@@ -141,6 +141,11 @@ class faiScript extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      new log("view","fai/".get_class($this),$this->dn);
+    }
+
     /* Fill templating stuff */
     $smarty= get_smarty();
     $display= "";
@@ -150,6 +155,7 @@ class faiScript extends plugin
       $this->dialog= new $this->subClassName($this->config,"new");
       $this->dialog->set_acl_base($this->acl_base);
       $this->dialog->set_acl_category("fai");
+      $this->dialog->parent = &$this;
       $this->is_dialog=true;
     }
 
@@ -386,7 +392,7 @@ class faiScript extends plugin
         $use_dn = $this->dn;
       }
    
-      @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes);
+      new log("remove","fai/".get_class($this),$use_dn,$this->attributes);
  
       prepare_to_save_FAI_object($use_dn,array(),true);
       
@@ -438,9 +444,9 @@ class faiScript extends plugin
     show_ldap_error($ldap->get_error(), sprintf(_("Creating of FAI/script with dn '%s' failed."),$this->dn));
 
     if($this->initially_was_account){
-      @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes);
+      new log("modify","fai/".get_class($this),$this->dn,$this->attributes);
     }else{
-      @log::log("create","fai/".get_class($this),$this->dn,$this->attributes);
+      new log("create","fai/".get_class($this),$this->dn,$this->attributes);
     }
 
     /* Do object tagging */