diff --git a/plugins/admin/systems/class_baseSelectDialog.inc b/plugins/admin/systems/class_baseSelectDialog.inc
index 6739c1848b042a10bc6555d86a9d28296841f45b..0a1040c7a22909d72193cfec8ba8122ab60fb998 100644 (file)
{
var $selectedBase = ""; // Used for navigation
var $base_selection_regex = "*"; // Used regex ...
-// var $Doesnothing = ""; // Checkbox which does nothing
-
var $BaseToUse = false; // used to specify the selected base,
// false if none is selected
var $allowedBases = array();
+ var $parent = NULL;
- function baseSelectDialog ($config,$onlyAllowThisBases = array())
+ function baseSelectDialog ($config,$parent,$onlyAllowThisBases = array())
{
- MultiSelectWindow::MultiSelectWindow($config,"BASEselectWindow");
-
+ echo "Need to pass module via parameter!<br>";
+ $module= "all";
+ MultiSelectWindow::MultiSelectWindow($config, "BASEselectWindow", $module);
+
+ $this->parent = $parent;
+
$this->selectedBase = $config->current['BASE'];
-
$this->allowedBases = $onlyAllowThisBases;
$this->SetTitle("Base");
function save_object()
{
+ /* Save current base */
+ $old_base = $this->selectedBase;
+
/* Save automatic created POSTs like regex, checkboxes */
MultiSelectWindow::save_object();
$this->selectedBase= $this->config->departments["/"];
}
}
+
+ /* Restore old base, if selected base is not allowed */
+ if(count($this->allowedBases) && !isset($this->allowedBases[$this->selectedBase])){
+ $this->selectedBase = $old_base;
+ }
}
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: