From bb61d9387b9e09a79df8aefa586a90b57f344a66 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 28 Oct 2009 17:10:14 +0000 Subject: [PATCH] Updated department management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14686 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_management.inc | 2 +- .../class_departmentManagement.inc | 33 ++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index 31573b68f..eb8af6df7 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -239,7 +239,7 @@ class management * @param Array 'target' A list of object dns, which should be affected by this method. * @param Array 'all' A combination of both 'action' and 'target'. */ - protected function removeEntryRequested($action,$target,$all) + protected function removeEntryRequested($action="",$target=array(),$all=array()) { $disallowed = array(); $this->dns = array(); diff --git a/gosa-core/plugins/admin/departments/class_departmentManagement.inc b/gosa-core/plugins/admin/departments/class_departmentManagement.inc index 96cea0fc6..a5a044d0d 100644 --- a/gosa-core/plugins/admin/departments/class_departmentManagement.inc +++ b/gosa-core/plugins/admin/departments/class_departmentManagement.inc @@ -23,7 +23,8 @@ class departmentManagement extends management { var $plHeadline = "Departments"; - var $plDescription = "Manage departmentw"; + var $plDescription = "Manage department"; + var $plIcon = "plugins/departments/images/plugin.png"; // Tab definition protected $tabClass = "deptabs"; @@ -72,8 +73,38 @@ class departmentManagement extends management $this->registerAction("new_organization","newEntry"); $this->registerAction("new_department","newEntry"); + $this->registerAction("performRecMove","performRecMove"); + $this->registerAction("tagDepartment","tagDepartment"); } + + function detectPostActions() + { + $actions = management::detectPostActions(); + if(isset($_GET['PerformRecMove'])) $action['action'] = "performRecMove"; + if(isset($_GET['TagDepartment'])) $action['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(); + } + } + + function newEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") { echo "Remember to add recursive move and department tagging again!"; -- 2.30.2