From 48dd6ec9706b604c0595d0bc5cb94191380633c0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 2 Apr 2004 07:36:11 +0000 Subject: [PATCH] not setting the class-vars direct - thought it still works, but calling the connect functions with them as parameters --- phpgwapi/inc/functions.inc.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php index f758600818..8c4f4f7125 100644 --- a/phpgwapi/inc/functions.inc.php +++ b/phpgwapi/inc/functions.inc.php @@ -143,18 +143,19 @@ * Load up the main instance of the db class. * \************************************************************************/ $GLOBALS['phpgw']->db = CreateObject('phpgwapi.db'); - $GLOBALS['phpgw']->db->Host = $GLOBALS['phpgw_info']['server']['db_host']; - $GLOBALS['phpgw']->db->Port = $GLOBALS['phpgw_info']['server']['db_port']; - $GLOBALS['phpgw']->db->Type = $GLOBALS['phpgw_info']['server']['db_type']; - $GLOBALS['phpgw']->db->Database = $GLOBALS['phpgw_info']['server']['db_name']; - $GLOBALS['phpgw']->db->User = $GLOBALS['phpgw_info']['server']['db_user']; - $GLOBALS['phpgw']->db->Password = $GLOBALS['phpgw_info']['server']['db_pass']; if ($GLOBALS['phpgw']->debug) { $GLOBALS['phpgw']->db->Debug = 1; } - $GLOBALS['phpgw']->db->Halt_On_Error = 'no'; + $GLOBALS['phpgw']->db->connect( + $GLOBALS['phpgw_info']['server']['db_name'], + $GLOBALS['phpgw_info']['server']['db_host'], + $GLOBALS['phpgw_info']['server']['db_port'], + $GLOBALS['phpgw_info']['server']['db_user'], + $GLOBALS['phpgw_info']['server']['db_pass'], + $GLOBALS['phpgw_info']['server']['db_type'] + ); @$GLOBALS['phpgw']->db->query("SELECT COUNT(config_name) FROM phpgw_config"); if(!@$GLOBALS['phpgw']->db->next_record()) {