Add ldap connection failure notice with exit to make sure they see it

This commit is contained in:
Miles Lott 2001-12-12 16:02:51 +00:00
parent 44cf6e8017
commit c332b62e15

View File

@ -130,6 +130,12 @@
$GLOBALS['phpgw']->db = $phpgw_setup->db; $GLOBALS['phpgw']->db = $phpgw_setup->db;
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common'); $GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
$GLOBALS['phpgw']->accounts = CreateObject('phpgwapi.accounts'); $GLOBALS['phpgw']->accounts = CreateObject('phpgwapi.accounts');
if(($GLOBALS['phpgw_info']['server']['account_repository'] == 'ldap') &&
!$GLOBALS['phpgw']->accounts->ds)
{
printf("<b>Error: Error connecting to LDAP server %s!</b><br>",$GLOBALS['phpgw_info']['server']['ldap_host']);
exit;
}
/* Begin transaction for acl, etc */ /* Begin transaction for acl, etc */
$phpgw_setup->db->transaction_begin(); $phpgw_setup->db->transaction_begin();