index 359b7f848d1c0af887e703dc0906bb510541bfad..c32eca5f0c17daddceda8a87c5c0b04ff6cf9899 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
*/
function execute()
{
*/
function execute()
{
- $_SESSION['errors'] .= "<div><b>".get_class($this)."</b> - ";
- $_SESSION['errors'] .= "<font face='courier' color='red' >ACL BASE: ".$this->acl_base."</font>";
- $_SESSION['errors'] .= "<font face='courier' color='blue'>ACL CAT: ".$this->acl_category."</font></div>";
+ 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);
/* This one is empty currently. Fabian - please fill in the docu code */
$_SESSION['current_class_for_help'] = get_class($this);
}
$todo[] = "is_account";
foreach($todo as $var){
}
$todo[] = "is_account";
foreach($todo as $var){
- $this->$var = $source->$var;
+ if (isset($source->$var)){
+ $this->$var= $source->$var;
+ }
}
}
}
}
function remove_snapshot($dn)
{
function remove_snapshot($dn)
{
- $ui = get_userinfo();
-
- if($this->acl_is_removeable()){
- $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;
}
}
/* Restore one of the already deleted objects */
if(preg_match("/^RestoreDeletedSnapShot_/",$name) && $once){
$once = false;
/* 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;
}
$this->snapDialog->display_restore_dialog = true;
$this->snapDialog->display_all_removed_objects = true;
}