summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a09a60e)
raw | patch | inline | side by side (parent: a09a60e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Jul 2008 07:04:04 +0000 (07:04 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 17 Jul 2008 07:04:04 +0000 (07:04 +0000) |
-... to avoid acting on posts that are not ment for the current dialog. e.g. we have to tow dialogs open.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11689 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11689 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_MultiSelectWindow.inc | patch | blob | history |
diff --git a/gosa-core/include/class_MultiSelectWindow.inc b/gosa-core/include/class_MultiSelectWindow.inc
index 0b15a765d450ee35df1695ff350cc74ed62d6b7e..123b88fe002a685979a556978f38ca4f604ad3b6 100644 (file)
var $SaveAdditionalVars = array(); // Additional Post vars to store
var $module= "";
+ var $base_selection_regex = "*";
+
var $IgnoreAccount = TRUE;
var $footer = "";
+ var $post_id = "1 2 3";
function ClearElementsList()
{
$this->CloseButtonString = _("Close");
$this->filterName = $filterName;
$this->ui = get_userinfo();
- $this->selectedBase = session::get('CurrentMainBase');
+ $this->post_id = preg_replace("/[^0-9]/","",microtime(TRUE));
/* Check default values for SaveAdditionalVars */
$MultiDialogFilters = session::get('MultiDialogFilters');
$smarty->assign("Title" , $this->string_Title);
$smarty->assign("Information" , $this->string_Information);
$smarty->assign("IgnoreAccount" , $this->IgnoreAccount);
+ $smarty->assign("POST_ID", $this->post_id);
/* Check for exeeded sizelimit */
$smarty->assign("hint" , print_sizelimit_warning());
Store data also into a session var, to keep the checkboxes check after reload */
function save_object()
{
+
+ /* Ensure that we do not handle posts for other dialogs
+ */
+ if((isset($_POST['POST_ID']) && $_POST['POST_ID'] != $this->post_id) ||
+ (isset($_GET['POST_ID']) && $_GET['POST_ID'] != $this->post_id)){
+ return;
+ }
+
/* Get up to date config */
if(isset($this->parent->config)){
$this->config = $this->parent->config;
}
}
-
/* If Back-button is pressed, move back one step in DN */
if($s_action=="back"){
+
/* Get parent deprtment and check if we are allowed to step in it */
- $base_back= preg_replace("/^[^,]+,/", "", session::get('CurrentMainBase'));
+ $base_back= preg_replace("/^[^,]+,/", "", $this->selectedBase);
$dep_id = $this->ui->get_module_departments($this->module);
if(in_array_ics($base_back,$dep_id)){
if(in_array($base_back,$this->config->departments)){
}
}
}
- session::set('CurrentMainBase',$this->selectedBase);
if(isset($_POST['MultiSelectWindow'.$this->filterName])){
/* check for a valid base */
if(!$base){
- if(!session::is_set('CurrentMainBase')){
- session::set('CurrentMainBase',$this->config->current['BASE']);
- }
- $base = session::get('CurrentMainBase');
+ $base = $this->selectedBase;
}
/* Create ldap obj and switch into base*/
/* Edit delete link for system types
*/
- $linkopen = "<a href='?plug=".$_GET['plug']."&act=dep_open&dep_id=%s'>%s</a>";
+ $linkopen = "<a href='?plug=".$_GET['plug']."&post_id=".$this->post_id."&act=dep_open&dep_id=%s'>%s</a>";
/* Create an array with all visible (in the list) departments */
$types = departmentManagement::get_support_departments();