diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-09-09 01:16:32 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-09-09 01:16:32 +0000 |
commit | 26474d349f6f03b3f74beb91ef680f0c634e05d5 (patch) | |
tree | 0a72774c7651facbb21ecf41764a939535ce6cfa /upgrade_feed.php | |
parent | fceb26e23175ff93988091a05c80443a39b9d865 (diff) |
- fix issue when picture_url_style = file (sql query like)
- sql call SET NAMES "xxx" (if required) in upgrade.php, upgrade_feed.php and after 65-database.php
git-svn-id: http://piwigo.org/svn/trunk@2512 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | upgrade_feed.php | 12 |
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 | |