Code

Fixed attachment for printer
[gosa.git] / plugins / admin / fai / class_faiTemplate.inc
index a4017ea8c7e35ac171b88adc47363466a694a929..cfe0f41e8e5cb1c9f9e732c3029fa0c8236f7f87 100644 (file)
@@ -97,17 +97,22 @@ class faiTemplate extends plugin
 
     /* Edit selected Sub Object */
     if((isset($_POST['EditSubObject']))&&(isset($_POST['SubObject']))){
-      $this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$_POST['SubObject']]);
-      $_SESSION['objectinfo'] = $this->SubObjects[$_POST['SubObject']]['dn'];
+
+      $temp = $_POST['SubObject'][0];
+    
+      $this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$temp]);
+      $_SESSION['objectinfo'] = $this->SubObjects[$temp]['dn'];
       $this->is_dialog=true;
     }
     
     /* Remove Sub object */
     if((isset($_POST['DelSubObject']))&&(isset($_POST['SubObject']))){
-      if($this->SubObjects[$_POST['SubObject']]['status'] == "edited"){
-        $this->SubObjects[$_POST['SubObject']]['status']= "delete";
-      }else{
-        unset($this->SubObjects[$_POST['SubObject']]);
+      foreach($_POST['SubObject'] as $temp){
+        if($this->SubObjects[$temp]['status'] == "edited"){
+          $this->SubObjects[$temp]['status']= "delete";
+        }else{
+          unset($this->SubObjects[$temp]);
+        }
       }
     }