Fixed a problem with english not being selected as the default lang

This commit is contained in:
jengo 2000-11-21 02:44:37 +00:00
parent d6295ba513
commit 99dd567247
2 changed files with 9 additions and 3 deletions

View File

@ -96,9 +96,14 @@
<td><?php echo lang("language"); ?></td>
<td>
<select name="lang">
<?php
if (! $phpgw_info["user"]["preferences"]["common"]["lang"]) {
$phpgw_info["user"]["preferences"]["common"]["lang"] = "en";
<?php
$phpgw->db->query("select preference_value from preferences where preference_owner='"
. $phpgw_info["user"]["account_id"] . "' and preference_name='lang' and "
. "preference_appname='common'",__LINE__,__FILE__);
$phpgw->db->next_record();
if ($phpgw->db->f("preference_value") == "") {
$phpgw_info["user"]["preferences"]["common"]["lang"] = "EN";
}
$lang_select[$phpgw_info["user"]["preferences"]["common"]["lang"]] = " selected";
$strSql = "SELECT lang_id, lang_name FROM languages WHERE available = 'Yes'";

View File

@ -27,4 +27,5 @@
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$currentver."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 1, 13, NULL, '".$currentver."')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 14, NULL, '$currentver')");
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('bookmarks', 'Book Marks', 1, 15, NULL, '$currentver')");
?>