summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 96919a5)
raw | patch | inline | side by side (parent: 96919a5)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Apr 2007 05:56:29 +0000 (05:56 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 Apr 2007 05:56:29 +0000 (05:56 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6017 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/contrib/gosa.conf b/contrib/gosa.conf
index 37b58a3791c9f008cc4ddd4a695bffd02384619b..bdd67a00a04b8a9122e02aebebfbc681b87a0b9e 100644 (file)
--- a/contrib/gosa.conf
+++ b/contrib/gosa.conf
{if $cv.optional.auto_network_hook_active}
auto_network_hook="{$cv.optional.auto_network_hook} "
{/if}
-{if $cv.force_global_lang}
- lang="{$cv.lang}"
-{else}
- lang=""
-{/if}
+ lang="{$cv.lang_selected}"
theme="{$cv.theme}"
session_lifetime="{$cv.optional.session_lifetime}"
compile="{$cv.optional.compile}"
diff --git a/html/setup.php b/html/setup.php
index b11642a6cd80a470752e70849268f9388f0eae45..37c3802116babb64b7005ecbfac7cf1ff723f25d 100644 (file)
--- a/html/setup.php
+++ b/html/setup.php
if(!isset($_SESSION['lang'])){
$_SESSION['lang'] = get_browser_language();
}
-if(isset($_POST['lang'])){
- $_SESSION['lang'] = $_POST['lang'];
+if(isset($_POST['lang_selected'])){
+ if($_POST['lang_selected'] != ""){
+ $_SESSION['lang'] = $_POST['lang_selected'];
+ }else{
+ $_SESSION['lang'] = get_browser_language();
+ }
}
$lang = $_SESSION['lang'];
index a940e5efad0db489fcd1039675113fe356be9fc5..2dae4b87ebecc6db450e1fe31c0719709db23760 100644 (file)
class setup_step_1 extends setup_step
{
- var $lang = "";
- var $languages = array();
- var $attributes = array("lang","force_global_lang");
- var $force_global_lang = FALSE;
+ var $lang_selected = ""; /* Language selected from select box */
+ var $lang = "en_EN"; /* Detected language */
+ var $languages = array();
+ var $attributes = array("lang","lang_selected");
function setup_step_1()
{
- $this->lang = get_browser_language();
-
- $this->is_enabled = TRUE;
- $this->is_active = TRUE;
-
+ $this->lang = get_browser_language();
+ $this->lang_selected = "";
+ $this->is_enabled = TRUE;
+ $this->is_active = TRUE;
$this->update_strings();
}
function execute()
{
- $this->languages = array("" => _("Automatic detection"),
+ $this->languages = array("" => _("Automatic"),
"de_DE" => _("German"),
"fr_FR" => _("French"),
"en_EN" => _("English"),
"ru_RU" => _("Russian"));
$smarty = get_smarty();
- $smarty->assign("languages", $this->languages);
- $smarty->assign("lang", $this->lang);
- $smarty->assign("force_global_lang", $this->force_global_lang);
+ $smarty->assign("languages", $this->languages);
+ $smarty->assign("lang", $this->lang);
+ $smarty->assign("lang_selected",$this->lang_selected);
return($smarty->fetch(get_template_path("setup_step1.tpl",TRUE,dirname(__FILE__))));
}
function save_object()
{
- if((isset($_POST['lang'])) && isset($this->languages[$_POST['lang']])) {
- $this->lang = $_POST['lang'];
+ if((isset($_POST['lang_selected'])) && isset($this->languages[$_POST['lang_selected']])) {
+ $this->lang_selected = $_POST['lang_selected'];
$this->is_completed = TRUE;
- $_SESSION['lang'] = $this->lang;
- if(isset($_POST['force_global_lang'])){
- if($_POST['force_global_lang'] == 1 ){
- $this->force_global_lang = TRUE;
- }else{
- $this->force_global_lang = FALSE;
- }
+ if($this->lang_selected != ""){
+ $_SESSION['lang'] = $this->lang_selected;
+ }else{
+ $_SESSION['lang'] = $this->lang;
}
}
}
index 338c72c0502a1a6b0f7d7dcedaab58c1001abf5f..44eeefcb6430202aafdb64ffbf2c304fd9d565b6 100644 (file)
$err_msg = _("Your configuration file is currently world readable. This is a big security risk. Please updated the file permissions as shown in the manual configuration part below.");
}
-
$smarty = get_smarty();
$smarty->assign("save_requested", isset($_POST['saveconf']));
$smarty->assign("err_msg",$err_msg);
diff --git a/setup/setup_step1.tpl b/setup/setup_step1.tpl
index e6df1b2ee71367dd8f68bc34c861fee6323e0ca3..91255b03101270cbc92d39e72d09c70c2d415c29 100644 (file)
--- a/setup/setup_step1.tpl
+++ b/setup/setup_step1.tpl
{t}Setup language{/t}
</div>
<div class='default' style=';'>
- <select name='lang' title='{t}Please your prefered language here{/t}' size=5 style='width:300px;'>
- {html_options options=$languages selected=$lang}
+ <select name='lang_selected' title='{t}Please your prefered language here{/t}' size=5 style='width:300px;'>
+ {html_options options=$languages selected=$lang_selected}
</select>
</div>
-
- <div class='default' style='float:left;width:160px;padding-top:25px;'>
- {t}GOsa language settings{/t}
- </div>
- <div class='default' style='float:left;padding-top:25px;'>
- <input type='radio' value='0' name='force_global_lang' {if !$force_global_lang} checked {/if}>
- {t}GOsa will automatically detect the language to use in the GOsa user interface.{/t}
- <br>
- <input type='radio' value='1' name='force_global_lang' {if $force_global_lang} checked {/if}>
- {t}Force GOsa to use the above selected language as default language.{/t}
- </div>
</div>