summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7a3f3ed)
raw | patch | inline | side by side (parent: 7a3f3ed)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Oct 2007 06:07:09 +0000 (06:07 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Oct 2007 06:07:09 +0000 (06:07 +0000) |
Do not remove a used device
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7483 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7483 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/devices/class_deviceGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/devices/class_deviceGeneric.inc b/plugins/admin/devices/class_deviceGeneric.inc
index 9581068608b488c30b3256c0c00cb028ca8d41c6..70029985af018e2bfee174e317dcbd4203478065 100644 (file)
plugin::remove_from_parent();
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
- $ldap->search("(&(objectClass=gotoEnvironment)(gotoHotplugDeviceDN=*))",array("cn","gotoHotplugDeviceDN"));
+
+ $ldap->search("(&(objectClass=gotoEnvironment)(gotoHotplugDeviceDN=".$this->dn."))",array("cn","gotoHotplugDeviceDN"));
$skip = FALSE;
$str ="";
$cnt = 3;
while($cnt && $attrs = $ldap->fetch()){
- if(in_array($this->dn,$attrs['gotoHotplugDeviceDN'])){
- $skip =TRUE;
- $str .= $attrs['cn'][0].", ";
- $cnt --;
- }
+ $skip =TRUE;
+ $str .= $attrs['cn'][0].", ";
+ $cnt --;
}
if($skip){
$str = preg_replace("/, $/","",$str);
-
if($cnt == 0){
$str .= "...";
}