Code

Updated ACL handling in groups
[gosa.git] / gosa-core / include / class_SnapShotDialog.inc
index 50b3ae29bd56c3acf0daa8421f6e0ed03e43f3bd..3bde8d02e759e3e03ff58087be829bd3a1daf6f3 100644 (file)
@@ -61,21 +61,13 @@ class SnapShotDialog extends plugin
                plugin::execute();
                $smarty = get_smarty();
 
-    if(!isset($this->parent->acl_module) || !count($this->parent->acl_module)){
-      trigger_error("Could not detect acl_module in parent object (".get_class($this->parent).").");
-      return("");
-    }
-
     $ui = get_userinfo();
-
                $once = true;
                foreach($_POST as $name => $value){
                        if((preg_match("/^RemoveSnapShot_/",$name)) && ($once)){
                                $once = false;
-       
         $entry = preg_replace("/^RemoveSnapShot_/","",$name);
         $entry = base64_decode(preg_replace("/_[xy]$/","",$entry));
-
         $found = false;
         foreach($this->last_list as $t_stamp => $obj){
           if($obj['dn'] == $entry){
@@ -87,7 +79,7 @@ class SnapShotDialog extends plugin
         if($found){
           $this->del_dn        = $entry;
           $smarty= get_smarty();
-          $smarty->assign("intro", sprintf(_("You're about to delete the snapshot '%s'."), @LDAP::fix($this->del_dn)));
+          $smarty->assign("intro", sprintf(_("You're about to delete the snapshot '%s'."), LDAP::fix($this->del_dn)));
           return($smarty->fetch (get_template_path('remove.tpl')));
         }
       }
@@ -152,8 +144,8 @@ class SnapShotDialog extends plugin
                                }
 
                                $field0 = array("string"=> $time_stamp , "attach"=> "style='vertical-align:top;width:120px;'");
-                               $field1 = array("string"=> htmlentities (utf8_decode($display_data)), "attach"=> "");
-                               $field2 = array("string"=> preg_replace("/%KEY/",base64_encode($entry['dn']),$actions) , 
+                               $field1 = array("string"=> htmlentities (utf8_decode(LDAP::fix($display_data))), "attach"=> "");
+                               $field2 = array("string"=> str_replace("%KEY",base64_encode($entry['dn']),$actions) , 
                                                                "attach"=> "style='border-right:0px;vertical-align:top;width:40px;text-align:right;'");
                                $DivListSnapShots->AddEntry(array($field0,$field1,$field2));
                        }               
@@ -165,7 +157,7 @@ class SnapShotDialog extends plugin
                $smarty->assign("restore_deleted",$this->display_all_removed_objects);
                $smarty->assign("RestoreMode",$this->display_restore_dialog);
                $smarty->assign("CurrentDate",date(_("Y-m-d, H:i:s")));
-               $smarty->assign("CurrentDN",$this->dn);
+               $smarty->assign("CurrentDN",LDAP::fix($this->dn));
                $smarty->assign("CurrentDescription",$this->CurrentDescription);
                return($smarty->fetch(get_template_path("snapshotdialog.tpl")));
        }