From 891229149e0e3b75662c688910fb88cac13ffc21 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 4 Feb 2004 00:33:37 +0000 Subject: [PATCH] allow sitemgr to use an other domain then the default domain (first defined in the header.inc.php) --- phpgwapi/inc/functions.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php index d0f275c3ae..9e8fc7ea13 100644 --- a/phpgwapi/inc/functions.inc.php +++ b/phpgwapi/inc/functions.inc.php @@ -85,9 +85,12 @@ echo '
The administrator must upgrade the header.inc.php file before you can continue.
'; exit; } - reset($GLOBALS['phpgw_domain']); - list($GLOBALS['phpgw_info']['server']['default_domain']) = each($GLOBALS['phpgw_domain']); - + if (!isset($GLOBALS['phpgw_info']['server']['default_domain']) || // allow to overwrite the default domain + !isset($GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['server']['default_domain']])) + { + reset($GLOBALS['phpgw_domain']); + list($GLOBALS['phpgw_info']['server']['default_domain']) = each($GLOBALS['phpgw_domain']); + } if (isset($_POST['login'])) // on login { $GLOBALS['login'] = $_POST['login'];