From f40fd344605bcaa8c8ec355d1ea35c556accc766 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 8 May 2006 10:38:15 +0000 Subject: [PATCH] Fixed tagging for objects that are newley created or modified git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3218 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_plugin.inc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/include/class_plugin.inc b/include/class_plugin.inc index 5c1484d27..4e761fbaa 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -862,7 +862,24 @@ class plugin } /* No tag? Find it yourself... */ - #.... + if ($tag == ""){ + $len= strlen($this->dn); + $fix= true; + foreach ($this->config->adepartments as $key => $tag){ + /* This one is shorter than our dn, its not relevant... */ + if ($len >= strlen($key)){ + continue; + } + + /* This one matches with the latter part. Break and don't fix this entry */ + if (preg_match('/(^|,)'.normalizePreg($key).'$/', $dn)){ + $fix= false; + break; + } + } + $this->gosaUnitTag= $tag; + } + /* Set tag? */ if ($tag != ""){ -- 2.30.2