mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-08 01:32:59 +02:00
Feature 1255 :
only one function use exceptions to deal with differents possible errors git-svn-id: http://piwigo.org/svn/trunk@5236 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -104,9 +104,15 @@ include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
|
||||
include( PHPWG_ROOT_PATH .'include/template.class.php');
|
||||
|
||||
// Database connection
|
||||
$pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
|
||||
$conf['db_password'], $conf['db_base']);
|
||||
pwg_select_db($conf['db_base'], $pwg_db_link);
|
||||
try
|
||||
{
|
||||
$pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
|
||||
$conf['db_password'], $conf['db_base']);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
my_error(l10n($e->getMessage(), true);
|
||||
}
|
||||
|
||||
pwg_db_check_charset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user