From 14d05dc25121c7cf417b76c6f8dc79430f2a29b1 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 26 Oct 2009 10:52:38 +0000 Subject: [PATCH] Implemented multiple edit git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14633 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_management.inc | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index 2e8b2de89..2a272076a 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -76,14 +76,12 @@ class management return($this->getHeader().$ret); } - - // Handle actions (POSTs and GETs) $str = $this->detectPostActions(); if($str) return($this->getHeader().$str); // Display tab object. - if($this->tabObject instanceOf tabs){ + if($this->tabObject instanceOf tabs || $this->tabObject instanceOf multi_plug){ $this->tabObject->save_object(); $display = $this->tabObject->execute(); $display.= $this->_getTabFooter(); @@ -110,7 +108,7 @@ class management protected function _getTabFooter() { - if(!$this->tabObject instanceOf tabs){ + if(!($this->tabObject instanceOf tabs || $this->tabObject instanceOf multi_plug)){ return(""); } @@ -122,7 +120,7 @@ class management } $str = ""; - if($this->tabObject->read_only == TRUE){ + if(isset($this->tabObject->read_only) && $this->tabObject->read_only == TRUE){ $str.= "

"; @@ -281,18 +279,29 @@ class management $this->tabObject->set_acl_base($this->dn); } }else{ - echo "? Multiple not implemented yet"; $this->is_new = FALSE; $this->is_singel_edit = FALSE; $this->is_multiple_edit = TRUE; + $this->dns = $target; + $tmp = new multi_plug($this->config,$this->tabClass,$this->config->data['TABS'][$this->tabType], + $this->dns,$this->headpage->getBase(),$this->aclCategory); + if ($tmp->entries_locked()){ + return($tmp->display_lock_message()); + } + $tmp->lock_entries($this->ui->dn); + if($tmp->multiple_available()){ + $this->tabObject = $tmp; + set_object_info($this->tabObject->get_object_info()); + } + } } protected function saveChanges() { - if($this->tabObject instanceOf tabs){ + if($this->tabObject instanceOf tabs || $this->tabObject instanceOf multi_plug){ $this->tabObject->save_object(); $msgs = $this->tabObject->check(); if(count($msgs)){ @@ -308,7 +317,7 @@ class management protected function applyChanges() { - if($this->tabObject instanceOf tabs){ + if($this->tabObject instanceOf tabs || $this->tabObject instanceOf multi_plug){ $this->tabObject->save_object(); $msgs = $this->tabObject->check(); if(count($msgs)){ -- 2.30.2