mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
Try to guess the values of PHPGW_SERVER_ROOT and PHPGW_INCLUDE_ROOT
This commit is contained in:
parent
51b445e0fb
commit
4d52af6e80
@ -26,10 +26,24 @@
|
|||||||
unset($setup_info);
|
unset($setup_info);
|
||||||
#include('../version.inc.php');
|
#include('../version.inc.php');
|
||||||
|
|
||||||
$adddomain = get_var('adddomain',Array('POST'));
|
/* Fetch the current real path.
|
||||||
if(@$adddomain)
|
* If this is in the server document root, then it is probably ok.
|
||||||
|
* Otherwise, don't guess, just show the usual instructive default.
|
||||||
|
*/
|
||||||
|
$realpath = realpath('..');
|
||||||
|
if(!ereg('^' . $_SERVER['DOCUMENT_ROOT'],$realpath))
|
||||||
{
|
{
|
||||||
|
if(PHP_OS == 'Windows')
|
||||||
|
{
|
||||||
|
$realpath = 'Drive:\\\\Path';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$realpath = '/path/to/egroupware';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$adddomain = get_var('adddomain',Array('POST'));
|
||||||
|
|
||||||
$default_db_ports = array(
|
$default_db_ports = array(
|
||||||
'pgsql' => 5432,
|
'pgsql' => 5432,
|
||||||
@ -413,10 +427,8 @@
|
|||||||
}
|
}
|
||||||
if(defined('PHPGW_SERVER_ROOT'))
|
if(defined('PHPGW_SERVER_ROOT'))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['server']['server_root'] = PHPGW_SERVER_ROOT == '..'
|
$GLOBALS['phpgw_info']['server']['server_root'] = (PHPGW_SERVER_ROOT == '..') ? $realpath : PHPGW_SERVER_ROOT;
|
||||||
? '/path/to/egroupware' : PHPGW_SERVER_ROOT;
|
$GLOBALS['phpgw_info']['server']['include_root'] = (PHPGW_INCLUDE_ROOT == '..') ? $realpath : PHPGW_SERVER_ROOT;
|
||||||
$GLOBALS['phpgw_info']['server']['include_root'] = PHPGW_INCLUDE_ROOT == '..'
|
|
||||||
? '/path/to/egroupware' : PHPGW_INCLUDE_ROOT;
|
|
||||||
}
|
}
|
||||||
elseif(!@isset($GLOBALS['phpgw_info']['server']['include_root']) && @$GLOBALS['phpgw_info']['server']['header_version'] <= 1.6)
|
elseif(!@isset($GLOBALS['phpgw_info']['server']['include_root']) && @$GLOBALS['phpgw_info']['server']['header_version'] <= 1.6)
|
||||||
{
|
{
|
||||||
@ -430,8 +442,8 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$detected .= lang('Sample configuration not found. using built in defaults') . '<br>' . "\n";
|
$detected .= lang('Sample configuration not found. using built in defaults') . '<br>' . "\n";
|
||||||
$GLOBALS['phpgw_info']['server']['server_root'] = '/path/to/egroupware';
|
$GLOBALS['phpgw_info']['server']['server_root'] = $realpath;
|
||||||
$GLOBALS['phpgw_info']['server']['include_root'] = '/path/to/egroupware';
|
$GLOBALS['phpgw_info']['server']['include_root'] = $realpath;
|
||||||
/* This is the basic include needed on each page for eGroupWare application compliance */
|
/* This is the basic include needed on each page for eGroupWare application compliance */
|
||||||
$GLOBALS['phpgw_info']['flags']['htmlcompliant'] = True;
|
$GLOBALS['phpgw_info']['flags']['htmlcompliant'] = True;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user