[geeklog-cvs] geeklog: Set default character set in siteconfig.php during migr...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Jun 27 13:29:28 EDT 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/84dd4dca30eb
changeset: 7146:84dd4dca30eb
user: Dirk Haun <dirk at haun-online.de>
date: Sat Jun 27 16:21:38 2009 +0200
description:
Set default character set in siteconfig.php during migration (cf. bug #0000916)
diffstat:
public_html/admin/install/migrate.php | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 7c8b39785c9e -r 84dd4dca30eb public_html/admin/install/migrate.php
--- a/public_html/admin/install/migrate.php Sat Jun 27 13:00:19 2009 +0200
+++ b/public_html/admin/install/migrate.php Sat Jun 27 16:21:38 2009 +0200
@@ -576,6 +576,8 @@
*/
case 3:
+ require_once 'lib-upgrade.php';
+
// Get the backup filename
$backup_file = $_REQUEST['backup_file'];
@@ -642,7 +644,15 @@
} else {
// Update db-config.php with the table prefix from the backup file.
if (!INST_writeConfig($dbconfig_path, $DB)) {
- exit($LANG_INSTALL[26] . ' ' . $dbconfig_path . $LANG_INSTALL[58]);
+ exit($LANG_INSTALL[26] . ' ' . $dbconfig_path
+ . $LANG_INSTALL[58]);
+ }
+
+ if (!INST_setDefaultCharset($siteconfig_path,
+ ($db_connection_charset == 'utf8'
+ ? 'utf-8' : $LANG_CHARSET))) {
+ exit($LANG_INSTALL[26] . ' ' . $siteconfig_path
+ . $LANG_INSTALL[58]);
}
// Send file to bigdump.php script to do the import.
More information about the geeklog-cvs
mailing list