summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3393e84)
raw | patch | inline | side by side (parent: 3393e84)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 29 Nov 2006 09:59:19 +0000 (09:59 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 29 Nov 2006 09:59:19 +0000 (09:59 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5243 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_servGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index 8586affc40b71210f5597907b106f78222effbf3..3c8de38e8fe2e7bdca5f167c7906b56360a81cff 100644 (file)
var $netConfigDNS;
var $modes = array();
-
+ var $ui ;
var $mapActions = array("reboot" => "",
"instant_update" => "softupdate",
"update" => "sceduledupdate",
{
plugin::plugin ($config, $dn, $parent);
+ $this->ui = get_userinfo();
$this->modes["active"]= _("Activated");
$this->modes["locked"]= _("Locked");
/* Base select dialog */
$once = true;
foreach($_POST as $name => $value){
- if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_moveable()){
+ if(preg_match("/^chooseBase/",$name) && $once ){
$once = false;
$this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
if($this->dialog->isClosed()){
$this->dialog = false;
}elseif($this->dialog->isSelected()){
- $this->base = $this->dialog->isSelected();
+
+ /* Only accept allowed bases */
+ $tmp = $this->get_allowed_bases();
+ if($tmp[$this->dialog->isSelected()]){
+ $this->base = $this->dialog->isSelected();
+ }
$this->dialog= false;
}else{
return($this->dialog->execute());
}
/* Assign base ACL */
- $baseACL = $this->getacl("base");
- if(!$this->acl_is_moveable()) {
- $baseACL = preg_replace("/w/","",$baseACL);
- }
- $smarty->assign("baseACL", $baseACL);
-
- $smarty->assign("bases", $this->get_allowed_bases());
+ $smarty->assign("baseACL" , $this->getacl("base"));
+ $smarty->assign("bases" , $this->get_allowed_bases());
/* Assign attributes */
foreach ($this->attributes as $attr){
/* Save data to object */
function save_object()
{
+ /* Save current base, to be able to revert to last base,
+ if new base is invalid or not allowed to be selected */
+ $base_tmp = $this->base;
plugin::save_object();
$this->netConfigDNS->save_object();
/* Get base selection */
- if($this->acl_is_moveable() && isset($_POST['base'])){
+ $tmp = $this->get_allowed_bases();
+ if($tmp[$_POST['base']]){
$this->base = $_POST['base'];
+ }else{
+ $this->base = $base_tmp;
}
-
}