summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df772d7)
raw | patch | inline | side by side (parent: df772d7)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 9 Oct 2007 13:19:20 +0000 (13:19 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 9 Oct 2007 13:19:20 +0000 (13:19 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7479 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_environment.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc
index 51f09c0d97280f029242ef590ede0b5ad48ea4b3..d06ad5f02d031cce39c4e91237bbed5450cbb15a 100644 (file)
$ldap->cd($this->config->current['BASE']);
for($i = 0 ; $i < $this->attrs['gotoHotplugDeviceDN']['count'] ; $i ++){
$ldap->cat($this->attrs['gotoHotplugDeviceDN'][$i]);
- $attrs = $ldap->fetch();
-
- if(isset($attrs['gotoHotplugDevice'][0])){
- $tmp = preg_split("/\|/",$attrs['gotoHotplugDevice'][0]);
- $tmp2 = array();
- $tmp2['name'] = $attrs['cn'][0];
- $tmp2['description'] = $tmp[0];
- $tmp2['id'] = $tmp[1];
- $tmp2['produkt'] = $tmp[2];
- $tmp2['vendor'] = $tmp[3];
- $tmp2['dn'] = $attrs['dn'];
- $this->gotoHotplugDevices[] = $tmp2;
+ if($ldap->count()){
+ $attrs = $ldap->fetch();
+
+ if(isset($attrs['gotoHotplugDevice'][0])){
+ $tmp = preg_split("/\|/",$attrs['gotoHotplugDevice'][0]);
+ $tmp2 = array();
+ $tmp2['name'] = $attrs['cn'][0];
+ $tmp2['description'] = $tmp[0];
+ $tmp2['id'] = $tmp[1];
+ $tmp2['produkt'] = $tmp[2];
+ $tmp2['vendor'] = $tmp[3];
+ $tmp2['dn'] = $attrs['dn'];
+ $this->gotoHotplugDevices[] = $tmp2;
+ }
+ }else{
+ print_red(sprintf(_("The selected hotplug device %s is no longer available, it will be removed when you save this account."),$this->attrs['gotoHotplugDeviceDN'][$i]));
}
}
}