diff options
Diffstat (limited to '')
-rw-r--r-- | admin/include/functions_install.inc.php | 10 | ||||
-rw-r--r-- | admin/include/functions_upgrade.php | 8 | ||||
-rw-r--r-- | include/common.inc.php | 4 | ||||
-rw-r--r-- | upgrade_feed.php | 4 |
4 files changed, 10 insertions, 16 deletions
diff --git a/admin/include/functions_install.inc.php b/admin/include/functions_install.inc.php index 335dd0393..94e011cde 100644 --- a/admin/include/functions_install.inc.php +++ b/admin/include/functions_install.inc.php @@ -143,15 +143,11 @@ function activate_core_themes() function install_db_connect(&$infos, &$errors) { - global $pwg_db_link; - try { - $pwg_db_link = pwg_db_connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpasswd'], $_POST['dbname']); - if ($pwg_db_link) - { - pwg_db_check_version(); - } + pwg_db_connect($_POST['dbhost'], $_POST['dbuser'], + $_POST['dbpasswd'], $_POST['dbname']); + pwg_db_check_version(); } catch (Exception $e) { diff --git a/admin/include/functions_upgrade.php b/admin/include/functions_upgrade.php index 349efa205..ed4b0f410 100644 --- a/admin/include/functions_upgrade.php +++ b/admin/include/functions_upgrade.php @@ -314,11 +314,9 @@ function upgrade_db_connect() try { - $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'], $conf['db_password'], $conf['db_base']); - if ($pwg_db_link) - { - pwg_db_check_version(); - } + pwg_db_connect($conf['db_host'], $conf['db_user'], + $conf['db_password'], $conf['db_base']); + pwg_db_check_version(); } catch (Exception $e) { diff --git a/include/common.inc.php b/include/common.inc.php index 2891c40e4..d05771ade 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -111,8 +111,8 @@ include(PHPWG_ROOT_PATH . 'include/functions.inc.php'); // Database connection try { - $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'], - $conf['db_password'], $conf['db_base']); + pwg_db_connect($conf['db_host'], $conf['db_user'], + $conf['db_password'], $conf['db_base']); } catch (Exception $e) { diff --git a/upgrade_feed.php b/upgrade_feed.php index 085237eac..87507c8d9 100644 --- a/upgrade_feed.php +++ b/upgrade_feed.php @@ -60,8 +60,8 @@ define('UPGRADES_PATH', PHPWG_ROOT_PATH.'install/db'); // +-----------------------------------------------------------------------+ try { - $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'], - $conf['db_password'], $conf['db_base']); + pwg_db_connect($conf['db_host'], $conf['db_user'], + $conf['db_password'], $conf['db_base']); } catch (Exception $e) { |