From: hickert Date: Tue, 23 Jun 2009 12:14:17 +0000 (+0000) Subject: Updated system management winstation were not detect in all cases. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7dcf639e9e58e9b630daf60051ff80126389db01;p=gosa.git Updated system management winstation were not detect in all cases. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@13772 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index e9200f014..7b73731c9 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -687,13 +687,22 @@ class systems extends plugin } /* This array represents the combination between checkboxes and search filters */ - $objs = array( "ShowServers" => array("CLASS" => "goServer" ,"TREE" => "ou=servers,ou=systems," ), - "ShowTerminals" => array("CLASS" => "gotoTerminal" ,"TREE" => "ou=terminals,ou=systems,"), - "ShowPrinters" => array("CLASS" => "gotoPrinter" ,"TREE" => "ou=printers,ou=systems," ), - "ShowDevices" => array("CLASS" => "ieee802Device" ,"TREE" => "ou=netdevices,ou=systems," ), - "ShowPhones" => array("CLASS" => "goFonHardware" ,"TREE" => "ou=phones,ou=systems," ), - "ShowWorkstations" => array("CLASS" => "gotoWorkstation" ,"TREE" => "ou=workstations,ou=systems," ), - "ShowWinWorkstations"=> array("CLASS" => $samba ,"TREE" => get_winstations_ou() )); + $objs = array( + + "ShowWinWorkstations"=> array("CLASS" => $samba , + "TREE" => get_winstations_ou()), + "ShowServers" => array("CLASS" => "goServer" , + "TREE" => "ou=servers,ou=systems," ), + "ShowTerminals" => array("CLASS" => "gotoTerminal" , + "TREE" => "ou=terminals,ou=systems,"), + "ShowPrinters" => array("CLASS" => "gotoPrinter" , + "TREE" => "ou=printers,ou=systems," ), + "ShowDevices" => array("CLASS" => "ieee802Device" , + "TREE" => "ou=netdevices,ou=systems," ), + "ShowPhones" => array("CLASS" => "goFonHardware" , + "TREE" => "ou=phones,ou=systems," ), + "ShowWorkstations" => array("CLASS" => "gotoWorkstation" , + "TREE" => "ou=workstations,ou=systems," )); /* Include the 'Display Systems of user' attribute */ if ((!empty($this->DivListSystem->UserRegex)) && ($this->DivListSystem->UserRegex!= "*")){ @@ -760,7 +769,17 @@ class systems extends plugin /* Detect type of object and create an entry for $this->terminals */ $terminal = array(); if ((in_array ($tmp, $responsible)) || ($add != "")){ - if (in_array_ics('gotoTerminal', $value["objectClass"])){ + if (in_array_ics($samba, $value["objectClass"])){ + $name= preg_replace('/\$$/', '', $value['cn'][0]); + if (isset($value['sambaDomainName'])){ + $domain= " [".$value['sambaDomainName'][0]."]"; + } else { + $domain= ""; + } + $terminal=$value; + $terminal['type'] ="W"; + $terminal['domain'] = $name.$domain; + }elseif (in_array_ics('gotoTerminal', $value["objectClass"])){ if (isset($value["macAddress"][0]) && $value["macAddress"][0] != "-"){ $terminal = $value; $terminal['type'] = "T"; @@ -804,16 +823,6 @@ class systems extends plugin } elseif (in_array_ics('ieee802Device', $value["objectClass"])){ $terminal = $value; $terminal['type'] = "C"; - } else{ - $name= preg_replace('/\$$/', '', $value['cn'][0]); - if (isset($value['sambaDomainName'])){ - $domain= " [".$value['sambaDomainName'][0]."]"; - } else { - $domain= ""; - } - $terminal=$value; - $terminal['type'] ="W"; - $terminal['domain'] = $name.$domain; } $this->terminals[]=$terminal; } @@ -845,7 +854,10 @@ class systems extends plugin $classes = $attrs['objectClass']; $type= ""; - if (in_array_ics('ieee802Device', $classes)){ + if (in_array_ics('sambaAccount', $classes) || + in_array_ics('sambaSamAccount', $classes)){ + $type= "winstation"; + }elseif (in_array_ics('ieee802Device', $classes)){ $type= "component"; }elseif (in_array_ics('gotoTerminal', $classes)){ $type= "terminal"; @@ -861,9 +873,6 @@ class systems extends plugin $type= "ArpNewDevice"; }elseif (in_array_ics('GOhard', $classes)){ $type= "NewDevice"; - }elseif (in_array_ics('sambaAccount', $classes) || - in_array_ics('sambaSamAccount', $classes)){ - $type= "winstation"; } return ($type); }