From: cajus Date: Tue, 11 Nov 2008 08:42:42 +0000 (+0000) Subject: Added fake tagger X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=97869b8f3172f4a02df91cca0901d0b242ce5108;p=gosa.git Added fake tagger git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12994 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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(); + } + } + + }