Code

Fixed remove from parent, for k=kolab entry.
[gosa.git] / include / class_MultiSelectWindow.inc
index b3df504d6a0fd1ec9fad27c372b120e5adc2e8c6..cee65eec483a4078d425a69ff474e225ae2b3190 100644 (file)
@@ -370,7 +370,11 @@ class MultiSelectWindow{
                           this is posted by the parent class MultiSelectWindow */
                        if(isset($_GET['act'])&& ($_GET['act'] == "dep_open")){
                                $s_entry = base64_decode($_GET['dep_id']);
-                               $this->selectedBase = $this->config->departments[trim($s_entry)];
+        if (!isset($this->config->departments[$s_entry])){
+          print_red(_("Error: The requested subtree has an inconsistent DN encoding, check your LDAP!"));
+        } else {
+                               $this->selectedBase = $this->config->departments[$s_entry];
+        }
                        }
 
                        /* back to the roots ^^ */
@@ -516,19 +520,18 @@ class MultiSelectWindow{
                                }
                        }
 
-
                        /* Add to divlist */
                        $row = array();
-                       $row[] = $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>", "attach" => "style='text-align:center;width:20px;'");
-                       $row[] = $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style=''");
+                       $row[]=$field1=array("string"=>"<img src='images/".$non_empty."folder.png' alt='department'>","attach"=>"style='text-align:center;width:20px;'");
+                       $row[]=$field2=array("string"=>sprintf($linkopen,base64_encode($key),$val), "attach" => "style=''");
 
                        if($numtabs > 2){       
                                for($i = 2 ; $i <$numtabs;$i++){
-                                       if($i ==($numtabs-1)){
-                                               $row[] = array("string"=>"&nbsp;","attach" => "style='width:60px;border-right:0px;text-align:right;'");
-                                       }else{
-                                               $row[] = array("string"=>"&nbsp;");
-                                       }
+          if(isset( $this->array_Header[$i]['attach'])){
+            $row[] = array("string"=>"&nbsp;","attach" => $this->array_Header[$i]['attach']);
+          }else{
+            $row[] = array("string"=>"&nbsp;");
+          }
                                }
                        }