Code

Fixed regex for opsi hosts
[gosa.git] / gosa-plugins / systems / admin / systems / class_divListSystem.inc
index f8ce5f991ab53b0b7ff4e739ce5425afc86dce6e..fa2466df448f29682468f5f8427020b7896290b3 100644 (file)
@@ -49,12 +49,12 @@ class divListSystem extends MultiSelectWindow
 
   function divListSystem (&$config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config, "System", array("server",
-                                                                  "workstation",
-                                                                  "terminal",
-                                                                  "phone",
-                                                                  "incoming",
-                                                                  "printer"));
+    $classes = array("server","workstation","terminal","phone","incoming","winworkstation","printer","component");
+    if(class_available("opsiGeneric")){
+      $classes[] = "opsi";
+    }
+
+    MultiSelectWindow::MultiSelectWindow($config, "System", $classes);
 
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
@@ -343,7 +343,7 @@ class divListSystem extends MultiSelectWindow
         $display= $val["cn"][0].$dsc;
       }
 
-      /* Check if this is a terminal/workstation && if we are allowed to change the gotoRootPasswd */
+      /* Check if this is a terminal/workstation && if we are allowed to change the userPassword */
       $display_key_for = array("terminal","workstation","server","component");
       $pwd_acl = $ui->get_permissions($val['dn'],$tabs[$type]['ACL'],"userPassword");
       if(preg_match("/w/",$pwd_acl) && in_array($type,$display_key_for)){
@@ -390,7 +390,7 @@ class divListSystem extends MultiSelectWindow
       $field1 = array("string" => sprintf($img['img'],$val['dn']),
           "attach" => "style='text-align:center;width:20px;'");
       $field2 = array("string" => sprintf($editlink,$key,$display),
-          "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'");
+          "attach" => "style='' title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'");
       $field3 = array("string" => preg_replace("/%KEY%/", "$key", $action2.$action),
           "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
 
@@ -445,7 +445,7 @@ class divListSystem extends MultiSelectWindow
     $str.= "<img class='center' src='plugins/systems/images/select_newsystem.png'
       title='".$num_new_str."' alt='".$num_new_str."'>&nbsp;".$cnts['NewDevice']."&nbsp;&nbsp;&nbsp;&nbsp;";
     $str.= "<img class='center' src='plugins/systems/images/select_winstation.png'
-      title='".$num_wws_str."' alt='".$num_wws_str."'>&nbsp;".$cnts['winstation']."&nbsp;&nbsp;&nbsp;&nbsp;";
+      title='".$num_wws_str."' alt='".$num_wws_str."'>&nbsp;".($cnts['winstation'] + $cnts['opsi_client'])."&nbsp;&nbsp;&nbsp;&nbsp;";
     $str.= "<img class='center' src='images/lists/folder.png'
       title='".$num_dep_str."' alt='".$num_dep_str."'>&nbsp;".$num_deps."&nbsp;&nbsp;&nbsp;&nbsp;";