From adefb7dac1c4675f1893167d4deafc3847f259ad Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 7 Dec 2007 10:02:33 +0000 Subject: [PATCH] Added comments - Added comments to multiple edit related functions. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8055 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_plugin.inc | 7 ++++- include/class_tabs.inc | 64 ++++++++++++++++++++++------------------ 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/include/class_plugin.inc b/include/class_plugin.inc index 97872d370..dd43046a6 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -280,7 +280,8 @@ class plugin } - /* Save data to object */ + /*! \brief Save HTML posted data to object + */ function save_object() { /* Update entry CSN if it is empty. */ @@ -288,6 +289,10 @@ class plugin $this->entryCSN = getEntryCSN($this->dn); } + /* MULTIPLE_EDIT + Ensures that only selected values will be used. + Should be rewritten. + */ if($this->multiple_support_active){ foreach($this->attributes as $attr){ if(isset($_POST["use_".$attr])){ diff --git a/include/class_tabs.inc b/include/class_tabs.inc index 2127a6cda..a702aed71 100644 --- a/include/class_tabs.inc +++ b/include/class_tabs.inc @@ -62,34 +62,6 @@ class tabs } } - - function multiple_support_available() - { - foreach($this->by_object as $name => $obj){ - if($obj->multiple_support){ - return(TRUE); - } - } - return(FALSE); - } - - function enable_multiple_support() - { - if(!$this->multiple_support_available()){ - return(FALSE); - }else{ - foreach($this->by_object as $name => $obj){ - if($obj->multiple_support){ - $this->by_object[$name]->multiple_support_active = TRUE; - }else{ - unset($this->by_object[$name]); - unset($this->by_name[$name]); - } - } - } - return(TRUE); - } - function execute() { @@ -363,6 +335,42 @@ class tabs } } } + + + /*! \brief Checks if one of the used tab plugins supports multiple edit. + @param boolean Returns TRUE if at least one plugins supports multiple edit. + */ + function multiple_support_available() + { + foreach($this->by_object as $name => $obj){ + if($obj->multiple_support){ + return(TRUE); + } + } + return(FALSE); + } + + + /*! \brief Enables multiple edit support for the given tab. + All unsupported plugins will be disabled. + @param boolean Returns TRUE if at least one plugin supports multiple edit + */ + function enable_multiple_support() + { + if(!$this->multiple_support_available()){ + return(FALSE); + }else{ + foreach($this->by_object as $name => $obj){ + if($obj->multiple_support){ + $this->by_object[$name]->multiple_support_active = TRUE; + }else{ + unset($this->by_object[$name]); + unset($this->by_name[$name]); + } + } + } + return(TRUE); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> -- 2.30.2