Code

Fixed dialog ignore account state
[gosa.git] / gosa-core / include / class_plugin.inc
index d0c7b8096bfd31744201bd048e780cee134e1764..5af5652297a8c8bd417dc9bb3c9e37553d105532 100644 (file)
@@ -333,7 +333,7 @@ class plugin
 
     /* Save values to object */
     foreach ($this->attributes as $val){
-      if ($this->acl_is_writeable($val) && isset ($_POST["$val"])){
+      if (isset ($_POST["$val"]) && $this->acl_is_writeable($val)){
         /* Check for modifications */
         if (get_magic_quotes_gpc()) {
           $data= stripcslashes($_POST["$val"]);
@@ -1465,7 +1465,7 @@ class plugin
       /* Restore selected snapshot */
       if(preg_match("/^RestoreSnapShot_/",$name) && $once){
         $once = false;
-        $entry = base64_decode(preg_replace("/^RestoreSnapShot_([^_]*)_[xy]$/i","\\1",$name));
+        $entry = base64_decode(preg_replace("/^RestoreSnapShot_(.*)$/i","\\1",$name));
 
         if(!empty($entry) && $ui->allow_snapshot_restore($this->dn,$this->parent->acl_module)){
           $this->restore_snapshot($entry);
@@ -1516,12 +1516,14 @@ class plugin
 
   function set_acl_base($base)
   {
+    @DEBUG (DEBUG_ACL, __LINE__, __FUNCTION__, __FILE__,"<b>".$base."</b>","<b>ACL-Base:</b> ");
     $this->acl_base= $base;
   }
 
 
   function set_acl_category($category)
   {
+    @DEBUG (DEBUG_ACL, __LINE__, __FUNCTION__, __FILE__,"<b>".$category."</b>(/".get_class($this).")","<b>ACL-Category:</b> ");
     $this->acl_category= "$category/";
   }
 
@@ -1809,7 +1811,7 @@ class plugin
         $this->multi_boxes[] = $val;
       }
 
-      if ($this->acl_is_writeable($val) && isset ($_POST["$val"])){
+      if (isset ($_POST["$val"]) && $this->acl_is_writeable($val)){
 
         /* Check for modifications */
         if (get_magic_quotes_gpc()) {