From: hickert Date: Mon, 25 Feb 2008 09:44:07 +0000 (+0000) Subject: Updated department tagging. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5626aa540492d0713db141cb5b191024e6a77d3e;p=gosa.git Updated department tagging. -Fixed add / remove of department tagging git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9100 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index acdcbfe08..89642ff57 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -88,6 +88,7 @@ class plugin /* Save unit tags */ var $gosaUnitTag= ""; + var $skipTagging= FALSE; /*! \brief Used standard values @@ -966,6 +967,14 @@ class plugin function tag_attrs(&$at, $dn= "", $tag= "", $show= false) { + /* Skip tagging? + If this is called from departmentGeneric, we have to skip this + tagging procedure. + */ + if($this->skipTagging){ + return; + } + /* No dn? Self-operation... */ if ($dn == ""){ $dn= $this->dn; diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc index a59500df8..08c7f3b10 100644 --- a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc @@ -315,6 +315,7 @@ class department extends plugin $this->gosaUnitTag= preg_replace("/\./", "", $sec.$usec); } } + $this->skipTagging = TRUE; plugin::save(); $this->attrs['gosaUnitTag'] = $this->gosaUnitTag; @@ -334,10 +335,7 @@ class department extends plugin } } $this->attrs['objectClass']= $tmp; - - if(!$has_unit_tag && isset($this->attrs['gosaUnitTag'])){ - $this->attrs['gosaUnitTag']= array(); - } + $this->attrs['gosaUnitTag']= array(); $this->gosaUnitTag = ""; }