From: hickert Date: Fri, 28 Nov 2008 12:47:39 +0000 (+0000) Subject: Updated Tagging. Was broken for non organizationalUnits X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0b65f94f193158b5546e4704578ce2277685cb42;p=gosa.git Updated Tagging. Was broken for non organizationalUnits git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13074 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/departments/class_countryGeneric.inc b/gosa-core/plugins/admin/departments/class_countryGeneric.inc index 1d51e6fe0..0fd7a0323 100644 --- a/gosa-core/plugins/admin/departments/class_countryGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_countryGeneric.inc @@ -23,7 +23,7 @@ class country extends department { /* attribute list for save action */ - var $attributes = array( "c", "ou", "description"); + var $attributes = array( "c", "ou", "description","gosaUnitTag"); var $objectclasses = array("top", "gosaDepartment"); var $structuralOC = array("country"); var $type ="c"; diff --git a/gosa-core/plugins/admin/departments/class_dcObject.inc b/gosa-core/plugins/admin/departments/class_dcObject.inc index 9c24f4737..4376493e8 100644 --- a/gosa-core/plugins/admin/departments/class_dcObject.inc +++ b/gosa-core/plugins/admin/departments/class_dcObject.inc @@ -23,7 +23,7 @@ class dcObject extends department { /* attribute list for save action */ - var $attributes = array( "dc", "ou", "description"); + var $attributes = array( "dc", "ou", "description","gosaUnitTag"); var $objectclasses = array("top", "dcObject", "gosaDepartment"); var $structuralOC = array("locality"); var $type = "dc"; diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc index 4d226e579..099d1967f 100644 --- a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc @@ -390,22 +390,19 @@ class department extends plugin } } $this->skipTagging = TRUE; - plugin::save(); - /* Remove tag information if needed */ if (!$this->is_administrational_unit && $this->initially_was_tagged){ $tmp= array(); /* Remove gosaAdministrativeUnit from this plugin */ - $has_unit_tag= false; foreach($this->attrs['objectClass'] as $oc){ + if (preg_match("/^gosaAdministrativeUnitTag$/i", $oc)){ + continue; + } if (!preg_match("/^gosaAdministrativeUnit$/i", $oc)){ $tmp[]= $oc; } - if (preg_match("/^gosaAdministrativeUnitTag$/i", $oc)){ - $has_unit_tag= true; - } } $this->attrs['objectClass']= $tmp; $this->attrs['gosaUnitTag']= array(); diff --git a/gosa-core/plugins/admin/departments/class_localityGeneric.inc b/gosa-core/plugins/admin/departments/class_localityGeneric.inc index 288902e9f..f85fb030e 100644 --- a/gosa-core/plugins/admin/departments/class_localityGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_localityGeneric.inc @@ -23,7 +23,7 @@ class locality extends department { /* attribute list for save action */ - var $attributes = array("l", "description", "ou"); + var $attributes = array("l", "description", "ou", "gosaUnitTag"); var $objectclasses = array("top", "gosaDepartment"); var $structuralOC = array("locality"); diff --git a/gosa-core/plugins/admin/departments/class_organizationGeneric.inc b/gosa-core/plugins/admin/departments/class_organizationGeneric.inc index 3ed574c08..a9b11ef19 100644 --- a/gosa-core/plugins/admin/departments/class_organizationGeneric.inc +++ b/gosa-core/plugins/admin/departments/class_organizationGeneric.inc @@ -28,7 +28,7 @@ class organization extends department "destinationIndicator","preferredDeliveryMethod","telexNumber", "telephoneNumber","internationaliSDNNumber","facsimileTelephoneNumber","street", "postOfficeBox","postalCode", "postalAddress","physicalDeliveryOfficeName", - "st","l","teletexTerminalIdentifier"); + "st","l","teletexTerminalIdentifier","gosaUnitTag"); var $objectclasses = array("top", "gosaDepartment"); var $structuralOC = array("organization");