summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7911656)
raw | patch | inline | side by side (parent: 7911656)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 21 Nov 2007 13:31:11 +0000 (13:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 21 Nov 2007 13:31:11 +0000 (13:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7845 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc
index 04ccf2ea805efbe4f07770f0dd3de10fee61639c..e38f27b14f1cb3e6fee0d3565ef971e48ab75d8d 100644 (file)
/* Eventually colorize phones */
$ldap->cd($this->config->current['BASE']);
- foreach ($this->hardware_list as $cn => $desc){
- $ldap->search("(goFonHardware=$cn)", array('cn'));
- if ($ldap->count() > 0){
- $ldap->fetch();
- if ($ldap->getDN() != $this->dn){
- $this->used_hardware[$cn]= $ldap->getDN();
+ $ldap->search("(goFonHardware=*)",array('cn','dn','goFonHardware'));
+ while($attrs = $ldap->fetch()){
+ $cn = $attrs['goFonHardware'][0];
+ if(isset($this->hardware_list[$cn])){
+ $this->used_hardware[$cn]= $cn;
}
- }
}
$this->hardware_list["automatic"]= _("automatic");
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index 51982ff1f7d2e3384742c9ee2bc808869bceda72..d28da81585d24c54400bb6e7214666b9bad2bd19 100644 (file)
/* Eventually colorize phones */
$ldap->cd($this->config->current['BASE']);
- foreach ($this->hardware_list as $cn => $desc){
- $ldap->search("(goFonHardware=$cn)", array('cn'));
- if ($ldap->count() > 0){
- $ldap->fetch();
- if ($ldap->getDN() != $this->dn){
- $this->used_hardware[$cn]= $ldap->getDN();
+ $ldap->search("(goFonHardware=*)",array('cn','dn','goFonHardware'));
+ while($attrs = $ldap->fetch()){
+ $cn = $attrs['goFonHardware'][0];
+ if(isset($this->hardware_list[$cn])){
+ $this->used_hardware[$cn]= $cn;
}
- }
}
if(preg_match("/\+/",$this->gotoXHsync)){
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 8a22f9e530ffa778dfb8274bfbbd184b06ec5600..6c831095918747fd57e86d778c787002ca38fbd5 100644 (file)
* so we must detect which phones are currently in use.
*/
$ldap->cd($this->config->current['BASE']);
- foreach ($this->hardware_list as $cn => $desc){
- $ldap->search("(goFonHardware=$cn)", array('cn'));
- if ($ldap->count() > 0){
- $ldap->fetch();
- if ($ldap->getDN() != $this->dn){
- $this->used_hardware[$cn]= $ldap->getDN();
+ $ldap->search("(goFonHardware=*)",array('cn','dn','goFonHardware'));
+ while($attrs = $ldap->fetch()){
+ $cn = $attrs['goFonHardware'][0];
+ if(isset($this->hardware_list[$cn])){
+ $this->used_hardware[$cn]= $cn;
}
- }
}
$this->hardware_list["automatic"]= _("automatic");
ksort($this->hardware_list);