Code

Updated mimetype copy & paste
[gosa.git] / plugins / admin / fai / class_faiHookEntry.inc
index b3e2227361dd4644e12f251d51c18fe26be3bc2f..244af77bde30cf836f0e256d61a0bf2e60e328b0 100644 (file)
@@ -18,7 +18,7 @@ class faiHookEntry extends plugin
                                     "savelog", "softupdate", "sysinfo","updatebase");
   var $dn            = "";
   var $cn            = "";
-  var $FAItask       = "";
+  var $FAItask       = "chboot";
   var $FAIscript     = "";
   var $description   = "";
   var $status        = "new";
@@ -79,9 +79,9 @@ class faiHookEntry extends plugin
     }
 
     /* Create download button*/
-    if($this->dn != "new"){
+    if($this->dn != "new" && $this->acl_is_readable("FAIscript")){
       $smarty->assign("DownMe","<a href='getFAIscript.php?id=".base64_encode($this->dn)."'>
-        <input type='button' value='"._("Download")."'>
+          <img src='images/save.png' alt='"._("Download")."' title='"._("Download")."' border=0 class='center'>
         </a>");
     }else{
       $smarty->assign("DownMe","");  
@@ -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));
       }
     }
 
@@ -125,10 +125,12 @@ class faiHookEntry extends plugin
   {
     if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){
       foreach($this->attributes as $attrs){
-        if(isset($_POST[$attrs])){
-          $this->$attrs = $_POST[$attrs];
-        }else{
-          $this->$attrs = "";
+        if($this->acl_is_writeable($attrs)){
+          if(isset($_POST[$attrs])){
+            $this->$attrs = $_POST[$attrs];
+          }else{
+            $this->$attrs = "";
+          }
         }
       }
     }