From 4466529bba9a86ba829207ac6c2f2729441380fb Mon Sep 17 00:00:00 2001 From: jengo Date: Mon, 6 Nov 2000 10:19:37 +0000 Subject: [PATCH] Reenabled lang() on login screen --- login.php | 20 ++++++++++---------- preferences/settings.php | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/login.php b/login.php index d09d339390..5dd5f60d1d 100755 --- a/login.php +++ b/login.php @@ -41,7 +41,7 @@ { global $tmpl; $tmpl->set_var("updating","
Opps! You caught us in the middle of a system" - . " upgrade.
Please, check back with us shortly.
"); + . " upgrade.
Please, check back with us shortly."); $tmpl->parse("loginout", "login"); $tmpl->p("loginout"); exit; @@ -102,18 +102,17 @@ } else { if ($last_loginid) { - $phpgw->db->query("select preference_value from preferences where preference_owner='$last_loginid' " + $phpgw->db->query("select account_id from accounts where account_lid='$last_loginid'"); + $phpgw->db->next_record(); + + $phpgw->db->query("select preference_value from preferences where preference_owner='" . $phpgw->db->f("account_id") . "' " . "and preference_name='lang'"); $phpgw->db->next_record(); - if (! $phpgw->db->f("preference_value")) { - $users_lang = "en"; -// } else { -// $users_lang = $phpgw->db->f("preference_value"); -// include($phpgw_info["server"]["include_root"] . "/lang/$users_lang/" . $users_lang -// . "_login.inc.php"); - } + $phpgw_info["user"]["preferences"]["common"]["lang"] = $phpgw->db->f("preference_value"); + $phpgw->translation->add_app("login"); } } +/* This has been put on hold until 0.9.4pre1, we have a different method of doing it (jengo) if ($phpgw_info["server"]["multiable_domains"]) { $tmpl->set_var("lang_domain",lang("Domain")); if ($phpgw_info["server"]["multiable_domains_use_select_box"]) { @@ -136,6 +135,7 @@ $tmpl->set_var("domain_row",""); $tmpl->parse("null","domain_row"); } +*/ $tmpl->set_var("login_url", $phpgw_info["server"]["webserver_url"] . "/login.php"); @@ -143,7 +143,7 @@ $tmpl->set_var("cd",check_logoutcode($cd)); $tmpl->set_var("cookie",show_cookie()); $tmpl->set_var("lang_username",lang("username")); - $tmpl->set_var("lang_phpgw_login","phpGroupWare login"); + $tmpl->set_var("lang_phpgw_login",lang("phpGroupWare login")); $tmpl->set_var("version",$phpgw_info["server"]["version"]); $tmpl->set_var("lang_password",lang("password")); $tmpl->set_var("lang_login",lang("login")); diff --git a/preferences/settings.php b/preferences/settings.php index e5cc763f03..005290cc55 100755 --- a/preferences/settings.php +++ b/preferences/settings.php @@ -108,7 +108,7 @@ } elseif ($phpgw->db->f("lang_id") == "EN") { echo " selected"; } - echo ">" . lang($phpgw->db->f("lang_name")) . ""; + echo ">" . $phpgw->db->f("lang_name") . ""; } ?>