Code

Specific FAItask is only assingable once per bundle
[gosa.git] / plugins / admin / fai / class_faiHookEntry.inc
index 472050aa6e531ce14cc738a6688bec2b6809e773..5b36ec8601f7c9b2b7ab5cca2610f82f7cf5c55d 100644 (file)
@@ -60,7 +60,15 @@ class faiHookEntry extends plugin
         $this->FAIscript = $str;
       }
     }
-    $smarty->assign("tasks", $this->tasks);
+
+    $used_tasks = $this->parent->getUsedFAItask();
+    $tasks = $this->tasks;
+    foreach($this->tasks as $id => $task){
+      if(in_array($task,$used_tasks)){
+        unset($tasks[$id]);
+      }
+    }
+    $smarty->assign("tasks", $tasks);
 
      /* Magic quotes GPC, escapes every ' " \, to solve some security risks
      * If we post the escaped strings they will be escaped again