From: hickert Date: Tue, 27 Jun 2006 08:21:50 +0000 (+0000) Subject: Fixed tagging X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eab69593c58f258dea53264a6c510c980c0f77ec;p=gosa.git Fixed tagging git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3930 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index 6dd6ff7de..f31c70f33 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -260,12 +260,11 @@ class department extends plugin return $message; } - - /* Save to LDAP */ - function save() - { + + /* Prepare Unit tag */ + function prepare_unit_tag() + { $ldap= $this->config->get_ldap_link(); - /* Add tag objects if needed */ if ($this->is_administrational_unit){ if(!in_array_ics("gosaAdministrativeUnit",$this->objectclasses)){ @@ -294,8 +293,17 @@ class department extends plugin } $this->gosaUnitTag= preg_replace("/\./", "", $sec.$usec); } - } + }else{ + $this->gosaUnitTag = ""; + } + } + + /* Save to LDAP */ + function save() + { + $ldap= $this->config->get_ldap_link(); + $this->prepare_unit_tag(); plugin::save(); /* Remove tag information if needed */ @@ -368,6 +376,8 @@ class department extends plugin /* Tag objects to have the gosaAdministrativeUnitTag */ function tag_objects($OnlySetTagFlag = false) { + $this->prepare_unit_tag(); + if(!$OnlySetTagFlag){ $smarty= get_smarty(); echo "".$smarty->fetch(get_template_path('headers.tpl'));