From 5986c1bf260fd44fd3818b01439e7efa0f5c2221 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 30 Oct 2009 16:25:20 +0000 Subject: [PATCH] Readded department tagging. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14720 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_departmentManagement.inc | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index 5397a3620..3a1117f83 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -78,33 +78,21 @@ class departmentManagement extends management function detectPostActions() { $actions = management::detectPostActions(); - if(isset($_GET['PerformRecMove'])) $action['action'] = "performRecMove"; - if(isset($_GET['TagDepartment'])) $action['action'] = "tagDepartment"; + if(isset($_GET['PerformRecMove'])) $actions['action'] = "performRecMove"; + if(isset($_GET['TagDepartment'])) $actions['action'] = "tagDepartment"; return($actions); } - function performRecMove() - { - if(isset($_GET['PerformRecMove'])){ - $this->deptabs->move_me(); - $this->DivListDepartment->selectedBase = $this->deptabs->by_object['department']->dn; - exit(); - } - } - function tagDepartment() { - if(isset($_GET['TagDepartment'])){ - $base_name = $this->deptabs->base_name; - $this->deptabs->by_object[$base_name]->tag_objects(); - exit(); - } + $plugname = $this->last_tabObject->base_name; + $this->last_tabObject->by_object[$plugname]->tag_objects(); + exit(); } function newEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") { - echo "Remember to add recursive move and department tagging again!"; $types= $this->get_support_departments(); $type = preg_replace("/^new_/","",$action); return(management::newEntry($action,$target,$all,$this->tabClass,$types[$type]['TAB'],$this->aclCategory)); @@ -120,9 +108,18 @@ class departmentManagement extends management protected function saveChanges() { management::saveChanges(); - - if($this->last_tabObject->am_i_moved()){ - return($smarty->fetch(get_template_path("dep_move_confirm.tpl",TRUE))); + + global $config; + $config->get_departments(); + $config->make_idepartments(); + $this->config = $config; + + $plugname = $this->last_tabObject->base_name; + if($this->last_tabObject->by_object[$plugname]->must_be_tagged()){ + $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.")); + return($smarty->fetch(get_template_path("dep_iframe.tpl",TRUE))); } } -- 2.30.2