feature:65 pwg_db_connect doesn't return anything now
git-svn-id: http://piwigo.org/svn/trunk@20720 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
758f29eb7d
commit
e8bdcecfeb
4 changed files with 10 additions and 16 deletions
|
@ -143,15 +143,11 @@ function activate_core_themes()
|
||||||
|
|
||||||
function install_db_connect(&$infos, &$errors)
|
function install_db_connect(&$infos, &$errors)
|
||||||
{
|
{
|
||||||
global $pwg_db_link;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$pwg_db_link = pwg_db_connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpasswd'], $_POST['dbname']);
|
pwg_db_connect($_POST['dbhost'], $_POST['dbuser'],
|
||||||
if ($pwg_db_link)
|
$_POST['dbpasswd'], $_POST['dbname']);
|
||||||
{
|
pwg_db_check_version();
|
||||||
pwg_db_check_version();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -314,11 +314,9 @@ function upgrade_db_connect()
|
||||||
|
|
||||||
try
|
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'],
|
||||||
if ($pwg_db_link)
|
$conf['db_password'], $conf['db_base']);
|
||||||
{
|
pwg_db_check_version();
|
||||||
pwg_db_check_version();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -111,8 +111,8 @@ include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
|
||||||
// Database connection
|
// Database connection
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
|
pwg_db_connect($conf['db_host'], $conf['db_user'],
|
||||||
$conf['db_password'], $conf['db_base']);
|
$conf['db_password'], $conf['db_base']);
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,8 +60,8 @@ define('UPGRADES_PATH', PHPWG_ROOT_PATH.'install/db');
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
|
pwg_db_connect($conf['db_host'], $conf['db_user'],
|
||||||
$conf['db_password'], $conf['db_base']);
|
$conf['db_password'], $conf['db_base']);
|
||||||
}
|
}
|
||||||
catch (Exception $e)
|
catch (Exception $e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue