setup will now add english by default

This commit is contained in:
jengo 2000-11-15 17:55:39 +00:00
parent 37d04a6e66
commit 881e68c1f9
2 changed files with 37 additions and 27 deletions

View File

@ -11,6 +11,8 @@
/* $Id$ */ /* $Id$ */
if (! $included) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "home", "noapi" => True); $phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "home", "noapi" => True);
include("../header.inc.php"); include("../header.inc.php");
@ -38,6 +40,11 @@
include($phpgw_info["server"]["include_root"]."/phpgwapi/phpgw_common.inc.php"); include($phpgw_info["server"]["include_root"]."/phpgwapi/phpgw_common.inc.php");
$common = new common; $common = new common;
$sep = $common->filesystem_separator(); $sep = $common->filesystem_separator();
} else {
$newinstall = True;
$lang_selected["en"] = "en";
$submit = True;
}
if ($submit) { if ($submit) {
if (count($lang_selected)) { if (count($lang_selected)) {
@ -87,10 +94,13 @@
} }
} }
if (! $included) {
echo "<center>Language files have been installed</center>"; echo "<center>Language files have been installed</center>";
exit; exit;
}
} else { } else {
if (! $included) {
?> ?>
<table border="0" align="center" width="<?php echo ($newinstall?"60%":"80%"); ?>"> <table border="0" align="center" width="<?php echo ($newinstall?"60%":"80%"); ?>">
<tr bgcolor="486591"> <tr bgcolor="486591">
@ -105,7 +115,7 @@
<?php echo ($newinstall?'<input type="hidden" name="newinstall" value="True">':""); ?> <?php echo ($newinstall?'<input type="hidden" name="newinstall" value="True">':""); ?>
<select name="lang_selected[]" multiple size="10"> <select name="lang_selected[]" multiple size="10">
<?php <?php
$db->query("select lang_id,lang_name from languages where available='Yes'"); $db->query("select lang_id,lang_name from languages where available='Yes' and lang_id != 'en'");
while ($db->next_record()) { while ($db->next_record()) {
echo '<option value="' . $db->f("lang_id") . '">' . $db->f("lang_name") . '</option>'; echo '<option value="' . $db->f("lang_id") . '">' . $db->f("lang_name") . '</option>';
} }
@ -127,6 +137,6 @@
echo '<center><input type="submit" name="submit" value="Install"></center>'; echo '<center><input type="submit" name="submit" value="Install"></center>';
} }
}

View File

@ -25,7 +25,7 @@
include("./sql/".$phpgw_info["server"]["db_type"]."_newtables.inc.php"); include("./sql/".$phpgw_info["server"]["db_type"]."_newtables.inc.php");
include("./sql/common_default_records.inc.php"); include("./sql/common_default_records.inc.php");
$included = True; $included = True;
include("../lang.php"); include($phpgw_info["server"]["server_root"] . "/setup/lang.php");
} }
echo "<table border=\"0\" align=\"center\">\n"; echo "<table border=\"0\" align=\"center\">\n";
echo " <tr bgcolor=\"486591\">\n"; echo " <tr bgcolor=\"486591\">\n";