Code

Fixed problem with not clickable buttons in fai package error msgs
[gosa.git] / plugins / admin / fai / class_faiHookEntry.inc
index 9a9450c77c9731b6a6fe035623e8af53e795b807..52b4e76b03076afe4ab00cb11d11248bdb63aafd 100644 (file)
@@ -18,11 +18,11 @@ class faiHookEntry extends plugin
                                     "savelog", "softupdate", "sysinfo","updatebase");
   var $dn            = "";
   var $cn            = "";
-  var $FAItask       = "";
+  var $FAItask       = "chboot";
   var $FAIscript     = "";
   var $description   = "";
   var $status        = "new";
-
+  var $parent        = NULL;
   var $FAIstate      = "";
   
   function faiHookEntry ($config, $dn= NULL,$object=false)
@@ -101,9 +101,9 @@ class faiHookEntry extends plugin
      */
     foreach($this->attributes as $attrs){
       if(get_magic_quotes_gpc()){
-        $smarty->assign($attrs,htmlentities(stripslashes($this->$attrs)));
+        $smarty->assign($attrs,(stripslashes($this->$attrs)));
       }else{
-        $smarty->assign($attrs,htmlentities($this->$attrs));
+        $smarty->assign($attrs,($this->$attrs));
       }
     }
 
@@ -142,6 +142,10 @@ class faiHookEntry extends plugin
     /* Call common method to give check the hook */
     $message= plugin::check();
 
+    if(isset($this->parent->SubObjects[$this->cn]) && $this->cn != $this->orig_cn){
+      $message[] =_("There is already a hook with the given name.");
+    }
+
     if(empty($this->FAIscript)) {
       $message[]=_("Please enter a value for script.");
     }