mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 23:48:28 +01:00
fixed instance selection by server-name to additionally find instance names containing only the domain-part (eg. www.domain.com matches instance domain.com, if no www.domain.com instance exists)
This commit is contained in:
parent
74c9b0ccb7
commit
34816b372f
@ -127,10 +127,21 @@
|
|||||||
$GLOBALS['egw_info']['server']['default_domain'] = $_SERVER['SERVER_NAME'];
|
$GLOBALS['egw_info']['server']['default_domain'] = $_SERVER['SERVER_NAME'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
$domain_part = explode('.',$_SERVER['SERVER_NAME']);
|
||||||
|
array_shift($domain_part);
|
||||||
|
$domain_part = implode('.',$domain_part);
|
||||||
|
if(isset($GLOBALS['egw_domain'][$domain_part]))
|
||||||
|
{
|
||||||
|
$GLOBALS['egw_info']['server']['default_domain'] = $domain_part;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
reset($GLOBALS['egw_domain']);
|
reset($GLOBALS['egw_domain']);
|
||||||
list($GLOBALS['egw_info']['server']['default_domain']) = each($GLOBALS['egw_domain']);
|
list($GLOBALS['egw_info']['server']['default_domain']) = each($GLOBALS['egw_domain']);
|
||||||
}
|
}
|
||||||
|
unset($domain_part);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($_POST['login'])) // on login
|
if (isset($_POST['login'])) // on login
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user