summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da3cd1e)
raw | patch | inline | side by side (parent: da3cd1e)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 May 2006 08:57:53 +0000 (08:57 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 May 2006 08:57:53 +0000 (08:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3260 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_plugin.inc | patch | blob | history |
index 52a2a03792ba65b58a3cccc26b5d999efc037f2c..c769b8fc32a7a9e52ba2c2901928c293c50ad7de 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
echo "DEBUG: $dn is not tagged<br>";
return;
}
- echo "DEBUG: Remove tagging from $dn.<br>";
- $nattrs= array("gosaUnitTag" => array());
- $nattrs['objectClass']= array();
- for ($i= 0; $i<$attrs['objectClass']['count']; $i++){
- $oc= $attrs['objectClass'][$i];
- if ($oc != "gosaAdministrativeUnitTag"){
- $nattrs['objectClass'][]= $oc;
+ if (count($attrs)){
+ echo "DEBUG: Remove tagging from $dn.<br>";
+ $nattrs= array("gosaUnitTag" => array());
+ $nattrs['objectClass']= array();
+ for ($i= 0; $i<$attrs['objectClass']['count']; $i++){
+ $oc= $attrs['objectClass'][$i];
+ if ($oc != "gosaAdministrativeUnitTag"){
+ $nattrs['objectClass'][]= $oc;
+ }
}
+ $ldap->cd($dn);
+ $ldap->modify($nattrs);
+ show_ldap_error($ldap->get_error());
+ } else {
+ echo "DEBUG: not removing tag ($tag) $dn - seems to have moved away<br>";
}
- $ldap->cd($dn);
- $ldap->modify($nattrs);
- show_ldap_error($ldap->get_error());
}
}