summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 59575a5)
raw | patch | inline | side by side (parent: 59575a5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Sep 2006 04:17:54 +0000 (04:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Sep 2006 04:17:54 +0000 (04:17 +0000) |
Added acl_get_bases to printGeneric
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4716 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4716 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_baseSelectDialog.inc | patch | blob | history | |
plugins/admin/systems/class_printGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_baseSelectDialog.inc b/plugins/admin/systems/class_baseSelectDialog.inc
index fe3ccd75585737841d01f53016b7796cffac5d94..0a1040c7a22909d72193cfec8ba8122ab60fb998 100644 (file)
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:
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 0d4312b48f31b933e41f3758053444cf4c71721f..43634baf83317e80b930c12cc02eea9b079976b9 100644 (file)
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this);
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->acl_get_bases());
$this->dialog->setCurrentBase($this->base);
$this->baseSelection = true;
}
}
/* Fill templating stuff */
- $smarty->assign("bases", $this->config->idepartments);
+ $smarty->assign("bases", $this->acl_get_bases());
$smarty->assign("base_select", $this->base);
/* Assign attributes */