From 478ea60361b0824f073fd6151f1f064c54eb3c52 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 26 Jun 2006 08:14:46 +0000 Subject: [PATCH] Added translation from TRUe/yes to true False/no to false git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3890 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_SnapShotDialog.inc | 15 ++++++++------- include/class_config.inc | 10 ++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/include/class_SnapShotDialog.inc b/include/class_SnapShotDialog.inc index 02f9b529b..9e42c81a6 100755 --- a/include/class_SnapShotDialog.inc +++ b/include/class_SnapShotDialog.inc @@ -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 diff --git a/include/class_config.inc b/include/class_config.inc index 6aa027788..b79df2426 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -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]; -- 2.30.2