Code

Updated Tagging. Was broken for non organizationalUnits
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Nov 2008 12:47:39 +0000 (12:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 28 Nov 2008 12:47:39 +0000 (12:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13074 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_countryGeneric.inc
gosa-core/plugins/admin/departments/class_dcObject.inc
gosa-core/plugins/admin/departments/class_departmentGeneric.inc
gosa-core/plugins/admin/departments/class_localityGeneric.inc
gosa-core/plugins/admin/departments/class_organizationGeneric.inc

index 1d51e6fe070315187b1ecd8208e9049839c3b4dd..0fd7a032335c143107efeb6519b2163b56435583 100644 (file)
@@ -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";
index 9c24f47376a41795ffe392394cbaf6e37bf25f86..4376493e8f1f71df5db30fc459b3e79a0fb1a7d6 100644 (file)
@@ -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";
index 4d226e5798db3dbdbd9545d0be102125bab33b52..099d1967f59efbc856a1abeb351975dcf7a084cf 100644 (file)
@@ -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();
index 288902e9f0e1180fccd3250ae7cec409c67cd13e..f85fb030e1aaa905f7a19ce93bd581f2ae9d18b3 100644 (file)
@@ -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");
 
index 3ed574c082cedd11e6e50784dde0905d2809bd47..a9b11ef19c161027d5594968709a008fb4699c2d 100644 (file)
@@ -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");