diff --git a/gosa-core/include/class_MultiSelectWindow.inc b/gosa-core/include/class_MultiSelectWindow.inc
index e32eb158cb00390dd1ff911032af806a121030cf..fee26be039adeaa10cbc133a46a80d9559a62ef7 100644 (file)
<?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
define ("SEPERATOR", 1002);
var $module= "";
var $IgnoreAccount = TRUE;
+ var $footer = "";
function ClearElementsList()
{
$mid = new LayersMenu(6, 7, 2, 1);
$mid->setImgwww("./images/");
$mid->setIcondir("./images/");
- $mid->setDirroot("../include/php_layers_menu/");
+ $mid->setDirroot("../include/utils/layer-menu/");
$mid->setHorizontalMenuTpl("../ihtml/".get_template_path("",FALSE).'GOsa_MultiSelectHeader.ihtml');
$mid->setSubMenuTpl("../ihtml/".get_template_path("",FALSE).'GOsa_MultiSelectHeaderSubEntry.ihtml');
$mid->setMenuStructureString($this->string_ListDropDown);
$this->CloseButtonString = _("Close");
$this->filterName = $filterName;
$this->ui = get_userinfo();
- $this->selectedBase = $_SESSION['CurrentMainBase'];
+ $this->selectedBase = session::get('CurrentMainBase');
/* Check default values for SaveAdditionalVars */
$MultiDialogFilters = session::get('MultiDialogFilters');
return($this->is_closed);
}
+
+ function SetListFooter($str){
+ $this->footer = $str;
+ }
+
+
/* Enable the close button */
function EnableCloseButton($bool)
{
/* Check for exeeded sizelimit */
$smarty->assign("hint" , print_sizelimit_warning());
- $smarty->assign("DivList" , $divlist->DrawList());
-
+ $smarty->assign("DivList" , $divlist->DrawList().$this->footer);
if($this->is_headpage){
$smarty->assign("tree_image", get_template_path('images/tree.png'));
if(isset($_GET['act'])&& ($_GET['act'] == "dep_open")){
$s_entry = base64_decode($_GET['dep_id']);
if (!isset($this->config->departments[$s_entry])){
- print_red(_("Error: The requested subtree has an inconsistent DN encoding, check your LDAP!"));
+ msg_dialog::display(_("LDAP error"), sprintf(_("Inconsistent DN encoding detected: '%s'"), LDAP::fix($s_entry)), ERROR_DIALOG);
} else {
$this->selectedBase = $this->config->departments[$s_entry];
}
if($s_action=="back"){
/* Get parent deprtment and check if we are allowed to step in it */
- $base_back= preg_replace("/^[^,]+,/", "", $_SESSION['CurrentMainBase']);
+ $base_back= preg_replace("/^[^,]+,/", "", session::get('CurrentMainBase'));
$dep_id = $this->ui->get_module_departments($this->module);
if(in_array_ics($base_back,$dep_id)){
if(isset($_POST['MultiSelectWindow'.$this->filterName])){
/* Save some additional vars */
+ $MultiDialogFilters = session::get('MultiDialogFilters');
foreach($this->SaveAdditionalVars as $name){
if(isset($_POST[$name])){
if(isset($this->$name)){
$this->$name = $_POST[$name];
- $_SESSION['MultiDialogFilters'][$this->filterName][$name] = $_POST[$name];
+ $MultiDialogFilters[$this->filterName][$name] = $_POST[$name];
}
}
}
+ session::set('MultiDialogFilters',$MultiDialogFilters);
/* Check posts from checkboxes
*/
$this->array_Checkboxes[$key]['default'] = false;
$this->$box['name'] = false;
}
+
/* Save settings in out session */
- $_SESSION['MultiDialogFilters'][$this->filterName][$box['name']] = $this->$box['name'];
+ $MultiDialogFilters = session::get('MultiDialogFilters');
+ $MultiDialogFilters[$this->filterName][$box['name']] = $this->$box['name'];
+ session::set('MultiDialogFilters',$MultiDialogFilters);
}
/* Check regex posts */
foreach($this->array_Regexes as $key => $box){
$this->array_Regexes[$key]['value'] = $_POST[$box['name']];
$this->$box['name'] = $_POST[$box['name']];
- $_SESSION['MultiDialogFilters'][$this->filterName][$box['name']] = $this->$box['name'];
+ $MultiDialogFilters = session::get('MultiDialogFilters');
+ $MultiDialogFilters[$this->filterName][$box['name']] = $this->$box['name'];
+ session::set('MultiDialogFilters',$MultiDialogFilters);
}
/* call close/save if buttons are pressed */
$val = preg_replace("/\*\**/","*",$val);
$this->array_Regexes[$key]['value'] = $val;
$this->$box['name'] = $val;
- $_SESSION['MultiDialogFilters'][$this->filterName][$box['name']] = $val;
+ $MultiDialogFilters = session::get('MultiDialogFilters');
+ $MultiDialogFilters[$this->filterName][$box['name']] = $val;
+ session::set('MultiDialogFilters',$MultiDialogFilters);
}
}
}
if(!session::is_set('CurrentMainBase')){
session::set('CurrentMainBase',$this->config->current['BASE']);
}
- $base = $_SESSION['CurrentMainBase'];
+ $base = session::get('CurrentMainBase');
}
/* Create ldap obj and switch into base*/