From 4ffe9a5a65daa160ddc56086835ffa8225ef6e3a Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 7 Dec 2007 10:34:51 +0000 Subject: [PATCH] Added comments & updated tab class git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8056 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_multi_plug.inc | 3 ++- include/class_plugin.inc | 18 ++++++++++++++++++ include/class_tabs.inc | 11 ++++++++++- plugins/personal/generic/class_user.inc | 7 ++----- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/include/class_multi_plug.inc b/include/class_multi_plug.inc index 17cdaa73e..9e944fe64 100644 --- a/include/class_multi_plug.inc +++ b/include/class_multi_plug.inc @@ -22,12 +22,13 @@ Data structure : - |->o_tab <-- dummy object that will be displayed displayed + |->o_tab <-- dummy object, collects HTML posts, displays ui |->a_handles <-- tab object for each given dn |->tab object for dn 1 |->tab object for dn 2 ... |->tab object for dn n + */ diff --git a/include/class_plugin.inc b/include/class_plugin.inc index dd43046a6..db615d67b 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -228,6 +228,24 @@ class plugin $this->initially_was_account= $this->is_account; } + + /*! \brief execute plugin + + Generates the html output for this node + */ + function execute_multiple() + { + /* This one is empty currently. Fabian - please fill in the docu code */ + $_SESSION['current_class_for_help'] = get_class($this); + + /* Reset Lock message POST/GET check array, to prevent perg_match errors*/ + $_SESSION['LOCK_VARS_TO_USE'] = $_SESSION['LOCK_VARS_USED'] =array(); + + return("Multiple edit is currently not implemented for this plugin."); + } + + + /*! \brief execute plugin Generates the html output for this node diff --git a/include/class_tabs.inc b/include/class_tabs.inc index a702aed71..9d4a3cedb 100644 --- a/include/class_tabs.inc +++ b/include/class_tabs.inc @@ -33,6 +33,8 @@ class tabs var $by_object= array(); var $SubDialog = false; + var $multiple_support = FALSE; + function tabs(&$config, $data, $dn, $acl_category= "") { /* Save dn */ @@ -90,7 +92,13 @@ class tabs $display.= "\n"; $display.= "
\n"; - $display.= $this->by_object[$this->current]->execute(); + /* If multiple edit is enabled for this tab, + we have tho display different templates */ + if(!$this->multiple_support){ + $display.= $this->by_object[$this->current]->execute(); + }else{ + $display.= $this->by_object[$this->current]->execute_multiple(); + } /* Footer for tabbed dialog */ $display.= "
"; @@ -360,6 +368,7 @@ class tabs if(!$this->multiple_support_available()){ return(FALSE); }else{ + $this->multiple_support = TRUE; foreach($this->by_object as $name => $obj){ if($obj->multiple_support){ $this->by_object[$name]->multiple_support_active = TRUE; diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index 8e35f8b1a..157b5b8d3 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -107,8 +107,6 @@ class user extends plugin "postalCode"); var $multiple_support = TRUE; - var $multiple_support_active = FALSE; - var $selected_edit_values = array(); var $multiple_user_handles = array(); /* constructor, if 'dn' is set, the node loads the given @@ -231,9 +229,6 @@ class user extends plugin /* Call parent execute */ plugin::execute(); - if($this->multiple_support_active){ - return($this->execute_multiple()); - } /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; @@ -1094,6 +1089,8 @@ class user extends plugin $this->set_acl_base($this->base); } + /* This checks will only be done, if we are not editing multiple objects + */ if(!$this->multiple_support_active){ /* UID already used? */ -- 2.30.2