summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eecf790)
raw | patch | inline | side by side (parent: eecf790)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Mar 2008 14:56:52 +0000 (14:56 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Mar 2008 14:56:52 +0000 (14:56 +0000) |
-Call save() only once, not twice, same for save_object().
-Remove of tag is not working properly, you have to save twice .......
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9679 594d385d-05f5-0310-b6e9-bd551577e9d8
-Remove of tag is not working properly, you have to save twice .......
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9679 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/departments/class_departmentGeneric.inc | patch | blob | history | |
gosa-core/plugins/admin/departments/class_departmentManagement.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc
index 9703ef320e7928a22433855e1229c113ee8a47e0..a7f12d069f57ddaad91454a252691ef6ccfb72e7 100644 (file)
function department (&$config, $dn)
{
-
+ echo __FUNCTION__;
plugin::plugin($config, $dn);
$this->is_account= TRUE;
$this->ui= get_userinfo();
function execute()
{
+ echo __FUNCTION__."<br>";
/* Call parent execute */
plugin::execute();
function clear_fields()
{
+ echo __FUNCTION__."<br>";
$this->dn = "";
$this->base = "";
function remove_from_parent()
{
+ echo __FUNCTION__."<br>";
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->dn);
$ldap->recursive_remove();
function must_be_tagged()
{
+ echo __FUNCTION__."<br>";
return $this->must_be_tagged;
}
function am_i_moved()
{
+ echo __FUNCTION__."<br>";
return $this->rec_cpy;
}
/* Save data to object */
function save_object()
{
+ echo __FUNCTION__."<br>";
if (isset($_POST['dep_generic_posted'])){
/* Create a base backup and reset the
/* Check values */
function check()
{
+ echo __FUNCTION__."<br>";
/* Call common method to give check the hook */
$message= plugin::check();
/* Save to LDAP */
function save()
{
+ echo __FUNCTION__."<br>";
$ldap= $this->config->get_ldap_link();
/* Add tag objects if needed */
function ShowMoveFrame()
{
+ echo __FUNCTION__."<br>";
$smarty = get_smarty();
$smarty->assign("src","?plug=".$_GET['plug']."&PerformRecMove&no_output_compression");
$smarty->assign("message","As soon as the move operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.");
function ShowTagFrame()
{
+ echo __FUNCTION__."<br>";
$smarty = get_smarty();
$smarty->assign("src","?plug=".$_GET['plug']."&TagDepartment&no_output_compression");
$smarty->assign("message","As soon as the tag operation has finished, you can scroll down to end of the page and press the 'Continue' button to continue with the department management dialog.");
/* Tag objects to have the gosaAdministrativeUnitTag */
function tag_objects($OnlySetTagFlag = false)
{
+ echo __FUNCTION__."<br>";
if(!$OnlySetTagFlag){
$smarty= get_smarty();
/* Print out html introduction */
/* Move/Rename complete trees */
function recursive_move($src_dn, $dst_dn,$force = false)
{
+ echo __FUNCTION__."<br>";
/* If force == false prepare to recursive move this object from src to dst
on the next call. */
if(!$force){
/* Return plugin informations for acl handling */
static function plInfo()
{
+ echo __FUNCTION__."<br>";
return (array("plShortName" => _("Generic"),
"plDescription" => _("Departments"),
"plSelfModify" => FALSE,
function handle_object_tagging($dn= "", $tag= "", $show= false)
{
+ echo __FUNCTION__."<br>";
/* No dn? Self-operation... */
if ($dn == ""){
$dn= $this->dn;
diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc
index dc4b55e135080c1d7615fa90a43eef0b8f489c23..d65c66987c5ab9f532fcc20ef53a0bfecdd7926c 100644 (file)
Edit department finished
***************/
- if ((isset($_POST['edit_finish'])) && (isset($this->deptabs->config)) && !isset($_POST['dep_move_confirm'])){
- $this->deptabs->save_object();
+ if ((isset($_POST['edit_finish']) || isset($_POST['dep_move_confirm'])) && (isset($this->deptabs->config))){
+
+ /* Check tabs, will feed message array.
+ This call will also initiate a sav_object() call.
+ So don't move it below the moved check !.
+ */
+ $message= $this->deptabs->check();
$obj = $this->deptabs->by_object['department'];
- if($obj->orig_dn != "new"){
+
+ /*************
+ MOVED ?
+ Check if this department is moved
+ *************/
+ if(!isset($_POST['dep_move_confirm']) && $obj->orig_dn != "new"){
if($obj->orig_ou != $obj->ou || $obj->base != $obj->orig_base){
return($smarty->fetch(get_template_path("dep_move_confirm.tpl",TRUE)));
}
}
- }
-
- /* Save changes */
- if ((isset($_POST['edit_finish'])|| isset($_POST['dep_move_confirm'])) && (isset($this->deptabs->config))){
-
- /* Check tabs, will feed message array */
- $message= $this->deptabs->check();
/* Save, or display error message? */
if (count($message) == 0){
global $config;
- $this->deptabs->save(true);
+ $this->deptabs->save();
$config->get_departments();
$config->make_idepartments();
$this->config = $config;
/* This object must be tagged, so set ObjectTaggingRequested to true */
- $this->deptabs->by_object['department']->tag_objects(TRUE);
if($this->deptabs->by_object['department']->must_be_tagged()){
$this->ObjectTaggingRequested = true;
}
}
- /***************
- In case of tagging/moving the object wasn't deleted, do it know
- ***************/
+ /***************
+ In case of tagging/moving the object wasn't deleted, do it know
+ ***************/
- /* If there is an unsaved object and all operations are done
- remove locks & save object tab & unset current object */
- if($this->ObjectInSaveMode && (!$this->RecursiveRemoveRequested) && (!$this->ObjectTaggingRequested)){
- $this->deptabs->save();
- $this->config->get_departments();
- $this->ObjectInSaveMode = false;
- if ($this->dn != "new"){
- del_lock ($this->dn);
- }
- unset ($this->deptabs);
- $this->deptabs= NULL;
- session::un_set('objectinfo');
- }
+ /* If there is an unsaved object and all operations are done
+ remove locks & save object tab & unset current object */
+ if($this->ObjectInSaveMode && (!$this->RecursiveRemoveRequested) && (!$this->ObjectTaggingRequested)){
+ $this->config->get_departments();
+ $this->ObjectInSaveMode = false;
+ if ($this->dn != "new"){
+ del_lock ($this->dn);
+ }
+ unset ($this->deptabs);
+ $this->deptabs= NULL;
+ session::un_set('objectinfo');
+ }
- /***************
+ /***************
Dialog canceled
***************/