Code

Added translation from TRUe/yes to true False/no to false
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Jun 2006 08:14:46 +0000 (08:14 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Jun 2006 08:14:46 +0000 (08:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3890 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_SnapShotDialog.inc
include/class_config.inc

index 02f9b529b0e7e350c11fc8ebb0cbb4fbf22d000e..9e42c81a6a733d5c27516016bcd87c1c0c0beee6 100755 (executable)
@@ -4,12 +4,13 @@
 class SnapShotDialog extends plugin 
 {
        var $config;
-       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 */    
-       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,7 +25,7 @@ class SnapShotDialog extends plugin
                plugin::execute();
                $smarty = get_smarty();
 
-               /* We must restore a snapshot, so get snapshots  */
+               /* We must restore a snapshot */
                if($this->display_restore_dialog){
 
                        /* Should we only display all snapshots of already deleted objects 
index 6aa0277886795d0f9b4199f8287000500a6e4527..b79df2426fb5b024e98e0224029ba8fd9a656748 100644 (file)
@@ -91,9 +91,19 @@ class config  {
       return;
     }
 
+    /* yes/no to true/false and upper case TRUE to true and so on*/
+    foreach($attrs as $name => $value){
+      if((preg_match("/^yes$/i",$value)) || (preg_match("/^true$/i",$value))){
+        $attrs[$name] = "true";
+      }elseif((preg_match("/^no$/i",$value)) || (preg_match("/^false$/i",$value))){
+        $attrs[$name] = "false";
+      } 
+    }
+
     /* Look through attributes */
     switch ($this->tags[$this->level-1]){
 
+
       /* Handle tab section */
       case 'TAB':      $name= $this->tags[$this->level-2];