From 3b8febb07647774cd3fc2db5acb08235f5cba7bd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 19 Nov 2005 20:28:39 +0000 Subject: [PATCH] 1) fixed not working detection of a connection to the db (postgres) 2) fixed detection of table-names with mixed case, which get returned in lowercase --- setup/inc/class.setup_detection.inc.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/setup/inc/class.setup_detection.inc.php b/setup/inc/class.setup_detection.inc.php index 2adab1842b..a07c20ea15 100755 --- a/setup/inc/class.setup_detection.inc.php +++ b/setup/inc/class.setup_detection.inc.php @@ -264,7 +264,7 @@ } $GLOBALS['egw_setup']->set_table_names(); - if (!$GLOBALS['egw_setup']->db->Link_ID) + if (!$GLOBALS['egw_setup']->db->Link_ID || !$GLOBALS['egw_setup']->db->Link_ID->_connectionID) { $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 1 (Create Database)'; return 1; @@ -364,12 +364,11 @@ } } - /* - @function check_app_tables - @abstract Verify that all of an app's tables exist in the db - @param $appname - @param $any optional, set to True to see if any of the apps tables are installed - */ + /** + * Verify that all of an app's tables exist in the db + * @param $appname + * @param $any optional, set to True to see if any of the apps tables are installed + */ function check_app_tables($appname,$any=False) { $none = 0; @@ -392,7 +391,7 @@ { echo '
check_app_tables(): Checking: ' . $appname . ',table: ' . $val; } - if(!in_array($val,$tables)) + if(!in_array($val,$tables) && !in_array(strtolower($val),$tables)) // names in tables might be lowercase { if($GLOBALS['DEBUG']) {