aboutsummaryrefslogtreecommitdiffstats
path: root/upgrade_feed.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-03-21 22:51:36 +0000
committernikrou <nikrou@piwigo.org>2010-03-21 22:51:36 +0000
commit4773d7a35052df4683b0445c08feae609764bfb0 (patch)
tree98a5e8345ad4698acd71b55040fd99e64f388fd2 /upgrade_feed.php
parent4158d3296072973d094cd295cc18f0035b5d7000 (diff)
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
Diffstat (limited to '')
-rw-r--r--upgrade_feed.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/upgrade_feed.php b/upgrade_feed.php
index 52f0cfb9f..6b991418d 100644
--- a/upgrade_feed.php
+++ b/upgrade_feed.php
@@ -54,10 +54,15 @@ define('UPGRADES_PATH', PHPWG_ROOT_PATH.'install/db');
// +-----------------------------------------------------------------------+
// | 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();