Code

Added ^$ to true/false mapping
[gosa.git] / include / class_SnapShotDialog.inc
index 07b410d21d785b1a6b268f81436b0b64c89316de..9e42c81a6a733d5c27516016bcd87c1c0c0beee6 100755 (executable)
@@ -4,12 +4,13 @@
 class SnapShotDialog extends plugin 
 {
        var $config;
-       var $attributes                 = array("CurrentDescription");
-       var $CurrentDescription = "";
-       var $parent                             = NULL;
-       var $Restore                    = false;                /* Defines the restore mode */
-       var $DeletedOnes                = false;                /* Specifies which objects will be listed */    
-       var $dialog                             = true;
+       var $attributes                                 = array("CurrentDescription");
+       var $CurrentDescription                 = "";
+       var $parent                                             = NULL;
+       var $display_restore_dialog             = false;                /* Defines the restore mode */
+       var $display_all_removed_objects= false;                /* Specifies which objects will be listed, all snapshots for a single entry 
+                                                                                                               or all snapshots of already deleted objects  */ 
+       var $dialog                                             = true;
        
        function SnapShotDialog($config,$dn,$parent)
        {
@@ -24,13 +25,13 @@ class SnapShotDialog extends plugin
                plugin::execute();
                $smarty = get_smarty();
 
-               /* We must restore a snapshot, so get snapshots  */
-               if($this->Restore){
+               /* We must restore a snapshot */
+               if($this->display_restore_dialog){
 
                        /* Should we only display all snapshots of already deleted objects 
                 or the snapshots for the given object dn */
                        $res = array();
-                       if($this->DeletedOnes){
+                       if($this->display_all_removed_objects){
                                if(is_array($this->dn)){
                                        $tmp = array();
                                        foreach($this->dn as $dn){
@@ -48,7 +49,7 @@ class SnapShotDialog extends plugin
                        
                                $data = $entry['description'][0];
                                $date = date("d.m.Y H.i.s",preg_replace("/\-.*$/","",$entry['gosaSnapshotTimestamp'][0]));
-                               if($this->DeletedOnes){
+                               if($this->display_all_removed_objects){
                                        $data.= " - ".$entry['gosaSnapshotDN'][0];
                                }
        
@@ -63,18 +64,18 @@ class SnapShotDialog extends plugin
                        $smarty->assign("CountSnapShots",count($res));
                }
 
-               $smarty->assign("RestoreMode",$this->Restore);
+               $smarty->assign("RestoreMode",$this->display_restore_dialog);
                $smarty->assign("CurrentDate",date("d.m.Y H:i"));
                $smarty->assign("CurrentDN",$this->dn);
                $smarty->assign("CurrentDescription",$this->CurrentDescription);
-               return($smarty->fetch(get_template_path("snapshotdialog.tpl",TRUE)));
+               return($smarty->fetch(get_template_path("snapshotdialog.tpl")));
        }
 
 
        function check()
        {
                $message = plugin::check();
-               if(!$this->Restore){
+               if(!$this->display_restore_dialog){
                        if(empty($this->CurrentDescription)){
                                $message[]  = _("Please specify a valid description for this snapshot.");
                        }