summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 293276a)
raw | patch | inline | side by side (parent: 293276a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 23 Jun 2006 11:56:25 +0000 (11:56 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 23 Jun 2006 11:56:25 +0000 (11:56 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3872 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/include/class_tabs.inc b/include/class_tabs.inc
index e0e8dbe422b0bf555c7fe25940a04bdf3b5aa0bf..6a9959e1ac9198736ab9ec1739c2e51beefb278b 100644 (file)
--- a/include/class_tabs.inc
+++ b/include/class_tabs.inc
} else {
$obj->remove_from_parent();
}
+ $this->by_object[$key]= $obj;
}
return (0);
}
diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index c508b614e36e58bf38aaf886ef284381c48e5d72..8a2528b275edbe523cfd858d1a697e5281c9286d 100644 (file)
var $MustBeMoved = "";
var $MoveDestination = "";
var $MoveSource = "";
- var $MoveOu = "";
/* attribute list for save action */
var $attributes = array("ou", "description", "businessCategory", "st",
/* Save to LDAP */
- function save()
+ function save($skipSave = false)
{
$ldap= $this->config->get_ldap_link();
$this->gosaUnitTag= "";
}
- plugin::save();
+ if(!$skipSave){
+ plugin::save();
+ }
/* Remove tag information if needed */
if (!$this->is_administrational_unit){
}
}
- /* Write back to ldap */
- $ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn, array('dn'));
- $a= $ldap->fetch();
- $ldap->cd($this->dn);
-
- if (count($a)){
- $this->cleanup();
- $ldap->modify ($this->attrs);
-
- $this->handle_post_events('modify');
- } else {
- $ldap->add($this->attrs);
- $this->handle_post_events('add');
- }
-
- show_ldap_error($ldap->get_error(), _("Saving department failed"));
+ if(!$skipSave){
+ /* Write back to ldap */
+ $ldap= $this->config->get_ldap_link();
+ $ldap->cat($this->dn, array('dn'));
+ $a= $ldap->fetch();
+ $ldap->cd($this->dn);
+
+ if (count($a)){
+ $this->cleanup();
+ $ldap->modify ($this->attrs);
+
+ $this->handle_post_events('modify');
+ } else {
+ $ldap->add($this->attrs);
+ $this->handle_post_events('add');
+ }
+ show_ldap_error($ldap->get_error(), _("Saving department failed"));
+ }
/* The parameter forces only to set must_be_tagged, and don't touch any objects
This will be done later */
$this->tag_objects(true);
diff --git a/plugins/admin/departments/class_departmentManagement.inc b/plugins/admin/departments/class_departmentManagement.inc
index dbfcab0b4ad7a6797c2b7799ede3d4ab4b4a02e4..5185e3e7b9b4b0018f9dcaf249c265fc224f665e 100644 (file)
/* Save current changes */
if(!$this->AfterSaveProcedure){
- $this->deptabs->save(true);
+ $this->deptabs->save();
}
/* Check if we have to tag this department */
diff --git a/plugins/admin/departments/tabs_department.inc b/plugins/admin/departments/tabs_department.inc
index deccb02c48f732e3ffea8468f18590d76b0d116e..b966f7e9d30e083597c259f8f6ab827024d236ff 100644 (file)
$this->by_object['department']->MustBeMoved = true;
$this->by_object['department']->MoveDestination = $new_dn;
$this->by_object['department']->MoveSource = $this->dn;
- $this->by_object['department']->MoveOu = $ou;
- $this->dn = $this->dn;
- $baseobject->dn = $this->dn;
$this->by_object['department']->ou = $baseobject->attrs['ou'][0];
- $this->by_object['department'] = $baseobject;
- return(tabs::save(TRUE));
+ $ret = tabs::save(TRUE);
+ $this->by_object['department']->save(true);
+ return($ret);
}
}else{
- $this->dn= $new_dn;
- $baseobject->dn= $this->dn;
+ $this->dn = $new_dn;
+ $baseobject->dn = $this->dn;
+ $ret = tabs::save(TRUE);
+ $baseobject->save(true);
$this->by_object['department']= $baseobject;
- return(tabs::save(TRUE));
+ return($ret);
}
}
}