Code

Fixed error FAIscript (invalid attribute )
[gosa.git] / plugins / admin / systems / class_systemManagement.inc
index 99d841ebc0e10a6900bbf8d8db49a6cb8d4bafac..7f7265767d0893e8d8217843fcebc8057dbb38d7 100644 (file)
@@ -574,16 +574,13 @@ class systems extends plugin
     " <input class='center' type='image' align='middle' src='images/select_new_phone.png'      name='newsystem_phone'       alt='"._("New Phone")."' title='"._("New Phone")."'>".
     " <input class='center' type='image' align='middle' src='images/select_new_component.png'  name='newsystem_component'   alt='"._("New Component")."' title='"._("New Component")."'>".
     " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
-    _("Current base")."&nbsp;<select name='depselect' onChange='mainform.submit()'>$options</select>".
+    _("Current base")."&nbsp;<select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
     " <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='".           _("Submit")."'>&nbsp;".
     "</div>";
 
-
-
     $action= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'     name='user_edit_%KEY%' title='"._("Edit system")."'>";
     $action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'   name='user_del_%KEY%' title='"._("Delete system")."'>";
 
-
     $divlist = new divlist("systemstab");
     $divlist->SetHeader(array(
           array("string" => "&nbsp;", "attach" => "style='text-align:center;width:20px;'"),
@@ -650,6 +647,9 @@ class systems extends plugin
   
       $pics = $cups.$logdb.$syslog.$imap.$samba.$nfs.$krb.$fon.$fax.$ldap;
       $pics = "";
+    
+      $val['cn'][0]= preg_replace('/\$$/', '', $val['cn'][0]);
+
       // Generate Array to Add
       if((isset($val['is_new']))&&(!empty($val['is_new']))){
         $display= "".$val["cn"][0]." ".$val['is_new'];
@@ -875,7 +875,15 @@ class systems extends plugin
      * We also need to search for the departments
      * So we are able to navigate like in konquerer
      */
-    $base2 = preg_replace("/ou=people,/i","",$base);
+
+    $peopleOU = get_people_ou();
+
+    if(empty($peopleOU)){
+      $base2 = $base;
+    }else{
+      $base2 = preg_replace("/".$peopleOU."/i","",$base);
+    }
+
 
     $res3 =  get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
                               TRUE, $base2, array("ou", "description"), TRUE);
@@ -981,11 +989,11 @@ class systems extends plugin
           } else {
             $domain= "";
           }
-            $terminal=$value;
-            $terminal['type']     ="W";
-            $terminal['domain']   = $name.$domain;
+          $terminal=$value;
+          $terminal['type']     ="W";
+          $terminal['domain']   = $name.$domain;
         }
-      $this->terminals[]=$terminal;
+        $this->terminals[]=$terminal;
       }
     }