From 881e68c1f99ed792f213bb47cc346f096c3f7b73 Mon Sep 17 00:00:00 2001 From: jengo Date: Wed, 15 Nov 2000 17:55:39 +0000 Subject: [PATCH] setup will now add english by default --- setup/lang.php | 62 ++++++++++++++++++++--------------- setup/sql/common_main.inc.php | 2 +- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/setup/lang.php b/setup/lang.php index e806d55685..a58ef12fd0 100644 --- a/setup/lang.php +++ b/setup/lang.php @@ -11,33 +11,40 @@ /* $Id$ */ - $phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "home", "noapi" => True); - include("../header.inc.php"); + if (! $included) { - $phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["include_root"]."/phpgwapi"; + $phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "home", "noapi" => True); + include("../header.inc.php"); + + $phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["include_root"]."/phpgwapi"; - // Authorize the user to use setup app - include("inc/setup_auth.inc.php"); - // Does not return unless user is authorized + // Authorize the user to use setup app + include("inc/setup_auth.inc.php"); + // Does not return unless user is authorized - /* Database setup */ - include($phpgw_info["server"]["api_dir"] . "/phpgw_db_".$phpgw_info["server"]["db_type"].".inc.php"); + /* Database setup */ + include($phpgw_info["server"]["api_dir"] . "/phpgw_db_".$phpgw_info["server"]["db_type"].".inc.php"); - $db = new db; - $db->Host = $phpgw_info["server"]["db_host"]; - $db->Type = $phpgw_info["server"]["db_type"]; - $db->Database = $phpgw_info["server"]["db_name"]; - $db->User = $phpgw_info["server"]["db_user"]; - $db->Password = $phpgw_info["server"]["db_pass"]; - //$db->Halt_On_Error = "report"; - //$db->Halt_On_Error = "no"; + $db = new db; + $db->Host = $phpgw_info["server"]["db_host"]; + $db->Type = $phpgw_info["server"]["db_type"]; + $db->Database = $phpgw_info["server"]["db_name"]; + $db->User = $phpgw_info["server"]["db_user"]; + $db->Password = $phpgw_info["server"]["db_pass"]; + //$db->Halt_On_Error = "report"; + //$db->Halt_On_Error = "no"; - echo "phpGroupWare Setup\n"; - echo "\n"; + echo "phpGroupWare Setup\n"; + echo "\n"; - include($phpgw_info["server"]["include_root"]."/phpgwapi/phpgw_common.inc.php"); - $common = new common; - $sep = $common->filesystem_separator(); + include($phpgw_info["server"]["include_root"]."/phpgwapi/phpgw_common.inc.php"); + $common = new common; + $sep = $common->filesystem_separator(); + } else { + $newinstall = True; + $lang_selected["en"] = "en"; + $submit = True; + } if ($submit) { if (count($lang_selected)) { @@ -87,10 +94,13 @@ } } - echo "
Language files have been installed
"; - exit; - + if (! $included) { + echo "
Language files have been installed
"; + exit; + } + } else { + if (! $included) { ?> "> @@ -105,7 +115,7 @@ ':""); ?> '; } - + } diff --git a/setup/sql/common_main.inc.php b/setup/sql/common_main.inc.php index 7841ef584c..bc83999dd9 100644 --- a/setup/sql/common_main.inc.php +++ b/setup/sql/common_main.inc.php @@ -25,7 +25,7 @@ include("./sql/".$phpgw_info["server"]["db_type"]."_newtables.inc.php"); include("./sql/common_default_records.inc.php"); $included = True; - include("../lang.php"); + include($phpgw_info["server"]["server_root"] . "/setup/lang.php"); } echo "
\n"; echo " \n";