Code

Added fake tagger
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 Nov 2008 08:42:42 +0000 (08:42 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 Nov 2008 08:42:42 +0000 (08:42 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12994 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_FAI.inc

index 19340d78617aae28225c3961ddbc2ad194bb82fb..d380e1efe09d198f1fc41be611333a5bf6196031 100644 (file)
@@ -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();                           
+    }                                                         
+  }                                                           
+
+
 }