From e1ca332f9209bc4e948597333827e86f867e79ad Mon Sep 17 00:00:00 2001 From: seek3r Date: Mon, 18 Dec 2000 20:41:26 +0000 Subject: [PATCH] changes needed for new format --- setup/createheader.php | 9 ++++++--- setup/inc/functions.inc.php | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/setup/createheader.php b/setup/createheader.php index dd49eab0d9..1f4dad9eb2 100644 --- a/setup/createheader.php +++ b/setup/createheader.php @@ -96,10 +96,13 @@ $phpgw_info["server"]["db_type"] = $phpgw_domain[$phpgw_info["server"]["default_domain"]]["db_type"]; $phpgw_info["server"]["config_passwd"] = $phpgw_domain[$phpgw_info["server"]["default_domain"]]["config_passwd"]; } + if (!isset($phpgw_info["server"]["api_dir"])) { + $phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["server_root"]."/phpgwapi"; + } } else { echo "sample configuration not found. using built in defaults
\n"; $phpgw_info["server"]["server_root"] = "/path/to/phpgroupware"; - $phpgw_info["server"]["include_root"] = "/path/to/phpgroupware/inc"; + $phpgw_info["server"]["api_dir"] = "/path/to/phpgroupware/phpgwapi"; /* This is the basic include needed on each page for phpGroupWare application compliance */ $phpgw_info["flags"]["htmlcompliant"] = True; @@ -134,7 +137,7 @@ $this_dir = dirname($SCRIPT_FILENAME); $updir = ereg_replace("/setup","",$this_dir); $phpgw_info["server"]["server_root"] = $updir; - $phpgw_info["server"]["include_root"] = $updir."/inc"; + $phpgw_info["server"]["api_dir"] = $updir."/phpgwapi"; } ?> @@ -142,7 +145,7 @@
Server Root
"> - Include Root
"> + phpGW API Dir
"> DB Host
">Hostname/IP of Databaseserver DB Name
">Name of Database DB User
">Name of DB User as phpgroupware has to connect as diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php index 8bb02d3e15..906d2b9a04 100644 --- a/setup/inc/functions.inc.php +++ b/setup/inc/functions.inc.php @@ -146,7 +146,9 @@ { global $phpgw_info, $phpgw_domain, $SetupDomain, $db; /* Database setup */ - $phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["include_root"]."/phpgwapi"; + if (!isset($phpgw_info["server"]["api_dir"])) { + $phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["server_root"]."/phpgwapi"; + } include($phpgw_info["server"]["api_dir"] . "/phpgw_db_".$phpgw_domain[$SetupDomain]["db_type"].".inc.php"); $db = new db; $db->Host = $phpgw_domain[$SetupDomain]["db_host"];