X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_plugin.inc;h=92cd6ae7c7eb6db74caaf34bc6abed4fc41742f9;hb=c79e9f20056ebc7ee5872d2a072fc36bc5b097ca;hp=515c30d12a6ba40186dc4bd99d3a18bbd1d518a7;hpb=7d291e06679edeea7e0763cd8127e66c10c30072;p=gosa.git diff --git a/include/class_plugin.inc b/include/class_plugin.inc index 515c30d12..92cd6ae7c 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -222,10 +222,13 @@ class plugin */ function execute() { + gosa_log("ACL ".get_class($this)." - ".$this->acl_category." - ".$this->acl_base); + /* This one is empty currently. Fabian - please fill in the docu code */ $_SESSION['current_class_for_help'] = get_class($this); + /* Reset Lock message POST/GET check array, to prevent perg_match errors*/ - $_SESSION['LOCK_VARS_TO_USE'] =array(); + $_SESSION['LOCK_VARS_TO_USE'] = $_SESSION['LOCK_VARS_USED'] =array(); } /*! \brief execute plugin @@ -913,7 +916,9 @@ class plugin } $todo[] = "is_account"; foreach($todo as $var){ - $this->$var = $source->$var; + if (isset($source->$var)){ + $this->$var= $source->$var; + } } } @@ -1121,18 +1126,13 @@ class plugin function remove_snapshot($dn) { -echo "FIXME: remove_snapshot uses old acl's
"; - $ui = get_userinfo(); - $acl = get_permissions ($dn, $ui->subtreeACL); - $acl = get_module_permission($acl, "snapshot", $dn); - - if (chkacl($this->acl, "delete") == ""){ - $ldap = $this->config->get_ldap_link(); - $ldap->cd($this->config->current['BASE']); - $ldap->rmdir_recursive($dn); - }else{ - print_red (_("You are not allowed to delete this snapshot!")); - } + $ui = get_userinfo(); + $old_dn = $this->dn; + $this->dn = $dn; + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + $ldap->rmdir_recursive($dn); + $this->dn = $old_dn; } @@ -1353,7 +1353,8 @@ echo "FIXME: remove_snapshot uses old acl's
"; /* Restore one of the already deleted objects */ if(preg_match("/^RestoreDeletedSnapShot_/",$name) && $once){ $once = false; - $this->snapDialog = new SnapShotDialog($this->config,$baseSuffixe,$this); + $this->snapDialog = new SnapShotDialog($this->config,"",$this); + $this->snapDialog->set_snapshot_bases($baseSuffixe); $this->snapDialog->display_restore_dialog = true; $this->snapDialog->display_all_removed_objects = true; } @@ -1484,13 +1485,6 @@ echo "FIXME: remove_snapshot uses old acl's
"; $new = false; } - /* Add current base */ - if(isset($this->base) && isset($this->config->idepartments[$this->base])){ - $deps[$this->base] = $this->config->idepartments[$this->base]; - }else{ - echo "No default base found. ".$this->base."
"; - } - $cat_bases = $ui->get_module_departments(preg_replace("/\/.*$/","",$category)); foreach($this->config->idepartments as $dn => $name){ @@ -1505,6 +1499,14 @@ echo "FIXME: remove_snapshot uses old acl's
"; $deps[$dn] = $name; } } + + /* Add current base */ + if(isset($this->base) && isset($this->config->idepartments[$this->base])){ + $deps[$this->base] = $this->config->idepartments[$this->base]; + }else{ + echo "No default base found. ".$this->base."
"; + } + return($deps); }