summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b82e7f)
raw | patch | inline | side by side (parent: 2b82e7f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 25 Feb 2008 09:35:29 +0000 (09:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 25 Feb 2008 09:35:29 +0000 (09:35 +0000) |
-Department generic can set and remove the UniTag again.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@9097 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@9097 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_plugin.inc | patch | blob | history | |
plugins/admin/departments/class_departmentGeneric.inc | patch | blob | history |
index c02a3b86c263d8b8af8c73faf535006763063b0b..a6e3da710567fc2ef77c576ce8308456eb80dee6 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
/* Save unit tags */
var $gosaUnitTag= "";
+ var $skipTagging= FALSE;
/*!
\brief Used standard values
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/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index 18f8db4abe4574ff700d5cf047b0269e92f22e02..0dc9495faec5c5be27cdf62351038a2ec8d65bbb 100644 (file)
var $orig_dn= "";
var $is_administrational_unit= false;
var $gosaUnitTag= "";
+ var $initially_was_tagged = FALSE;
var $rec_dst=false; // Destination for recursive move
var $rec_src=false; // Source for recursive move
/* Is administrational Unit? */
if ($dn != "new" && in_array_ics('gosaAdministrativeUnit', $this->attrs['objectClass'])){
$this->is_administrational_unit= true;
+ $this->initially_was_tagged = TRUE;
}
}
/* Add tag objects if needed */
if ($this->is_administrational_unit){
- if(!in_array_ics("gosaAdministrativeUnit",$this->objectclasses)){
+ if(!$this->initially_was_tagged){
$this->objectclasses[]= "gosaAdministrativeUnit";
$this->gosaUnitTag= "";
+ $this->initially_was_tagged = TRUE;
}
if ($this->gosaUnitTag == ""){
}
}
- plugin::save();
+ $this->skipTagging = TRUE;
+ plugin::save();
/* Remove tag information if needed */
if (!$this->is_administrational_unit){
}
}
$this->attrs['objectClass']= $tmp;
-
- if(!$has_unit_tag && isset($this->attrs['gosaUnitTag'])){
- $this->attrs['gosaUnitTag']= array();
- }
+ $this->attrs['gosaUnitTag']= array();
+ $this->gosaUnitTag = "";
}
/* Write back to ldap */