summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: faaa5f4)
raw | patch | inline | side by side (parent: faaa5f4)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 May 2006 06:38:35 +0000 (06:38 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 May 2006 06:38:35 +0000 (06:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3275 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_plugin.inc | patch | blob | history |
index 4b0248f36c44e63599247094eb1fd53b41d642c9..b2428de68e9f138bf0578f9ad7c5e6eb4ee37b36 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
if ($tag == ""){
$len= strlen($dn);
- echo "DEBUG: No tag for $dn - looking for one...<br>";
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "No tag for $dn - looking for one...", "Tagging");
$relevant= array();
foreach ($this->config->adepartments as $key => $ntag){
/* This one matches with the latter part. Break and don't fix this entry */
if (preg_match('/(^|,)'.normalizePreg($key).'$/', $dn)){
- echo "DEBUG: Possibly relevant: $key<br>";
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "DEBUG: Possibly relevant: $key", "Tagging");
$relevant[strlen($key)]= $ntag;
continue;
}
$ldap->cat($dn, array('gosaUnitTag', 'objectClass'));
$attrs= $ldap->fetch();
if(isset($attrs['gosaUnitTag'][0]) && $attrs['gosaUnitTag'][0] == $tag){
- echo "DEBUG: $dn is already tagged<br>";
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "$dn is already tagged", "Tagging");
return;
}
if (count($attrs)){
- echo "DEBUG: Add tagging ($tag) to $dn.<br>";
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Add tagging ($tag) to $dn", "Tagging");
$nattrs= array("gosaUnitTag" => $this->gosaUnitTag);
$nattrs['objectClass']= array();
for ($i= 0; $i<$attrs['objectClass']['count']; $i++){
$ldap->cd($dn);
$ldap->modify($nattrs);
} else {
- echo "DEBUG: not tagging ($tag) $dn - seems to have moved away<br>";
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Not tagging ($tag) $dn - seems to have moved away", "Tagging");
}
} else {
$ldap->cat($dn, array('gosaUnitTag', 'objectClass'));
$attrs= $ldap->fetch();
if (isset($attrs['objectClass']) && !in_array_ics("gosaAdministrativeUnitTag", $attrs['objectClass'])){
- echo "DEBUG: $dn is not tagged<br>";
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "$dn is not tagged", "Tagging");
return;
}
if (count($attrs)){
- echo "DEBUG: Remove tagging from $dn.<br>";
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Remove tagging from $dn", "Tagging");
$nattrs= array("gosaUnitTag" => array());
$nattrs['objectClass']= array();
for ($i= 0; $i<$attrs['objectClass']['count']; $i++){
$ldap->modify($nattrs);
show_ldap_error($ldap->get_error());
} else {
- echo "DEBUG: not removing tag ($tag) $dn - seems to have moved away<br>";
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Not removing tag ($tag) $dn - seems to have moved away", "Tagging");
}
}