Code

All snapshots listed can be deleted. Else they weren't shown.
[gosa.git] / include / class_plugin.inc
index 9f92c624b90d15f7ada4db1823710116c196d1c1..c32eca5f0c17daddceda8a87c5c0b04ff6cf9899 100644 (file)
@@ -915,7 +915,9 @@ class plugin
     }
     $todo[] = "is_account";
     foreach($todo as $var){
-      $this->$var = $source->$var;
+      if (isset($source->$var)){
+        $this->$var= $source->$var;
+      }
     }
   }
 
@@ -1126,14 +1128,9 @@ class plugin
     $ui       = get_userinfo();
     $old_dn   = $this->dn; 
     $this->dn = $dn;
-    
-    if($this->acl_is_removeable() && $this->acl_is_createable()){
-      $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!"));
-    }
+    $ldap = $this->config->get_ldap_link();
+    $ldap->cd($this->config->current['BASE']);
+    $ldap->rmdir_recursive($dn);
     $this->dn = $old_dn;
   }