aboutsummaryrefslogtreecommitdiffstats
path: root/upgrade_feed.php
diff options
context:
space:
mode:
Diffstat (limited to 'upgrade_feed.php')
-rw-r--r--upgrade_feed.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/upgrade_feed.php b/upgrade_feed.php
index 44ccbe5db..f50b69433 100644
--- a/upgrade_feed.php
+++ b/upgrade_feed.php
@@ -42,10 +42,14 @@ define('UPGRADES_PATH', PHPWG_ROOT_PATH.'install/db');
// | Database connection |
// +-----------------------------------------------------------------------+
-mysql_connect($cfgHote, $cfgUser, $cfgPassword)
-or die("Could not connect to database server");
-mysql_select_db($cfgBase)
-or die("Could not connect to database");
+mysql_connect($cfgHote, $cfgUser, $cfgPassword) or die("Could not connect to database server");
+mysql_select_db($cfgBase) or die("Could not connect to database");
+if ( version_compare(mysql_get_server_info(), '4.1.0', '>=')
+ and defined('DB_CHARSET') and DB_CHARSET!='' )
+{
+ pwg_query('SET NAMES "'.DB_CHARSET.'"');
+}
+
// +-----------------------------------------------------------------------+
// | Upgrades |