From 97869b8f3172f4a02df91cca0901d0b242ce5108 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 11 Nov 2008 08:42:42 +0000 Subject: [PATCH] Added fake tagger git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12994 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_FAI.inc | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gosa-plugins/fai/admin/fai/class_FAI.inc b/gosa-plugins/fai/admin/fai/class_FAI.inc index 19340d786..d380e1efe 100644 --- a/gosa-plugins/fai/admin/fai/class_FAI.inc +++ b/gosa-plugins/fai/admin/fai/class_FAI.inc @@ -1236,6 +1236,33 @@ class FAI } return(""); } + + + function tag_attrs(&$at, $dn= "", $tag= "", $show= false) + { + /* Remove tags that may already be here... */ + remove_objectClass("gosaAdministrativeUnitTag", $at); + if (isset($at['gosaUnitTag'])){ + unset($at['gosaUnitTag']); + } + + /* Set tag? */ + if ($tag != ""){ + add_objectClass("gosaAdministrativeUnitTag", $at); + $at['gosaUnitTag']= $tag; + } + + /* Initially this object was tagged. + - But now, it is no longer inside a tagged department. + So force the remove of the tag. + (objectClass was already removed obove) + */ + if($tag == ""){ + $at['gosaUnitTag'] = array(); + } + } + + } -- 2.30.2