aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-10-28 21:54:43 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-10-28 21:54:43 +0100
commit88f72bd411ef1d5e69415712d225bba778d28d1c (patch)
treecbaa612b9f023a7e8f55f217c787b486c61339d9
parent157de2d80dd4f0b298c33819e55fcd05fdfce568 (diff)
downloadforums-88f72bd411ef1d5e69415712d225bba778d28d1c.tar
forums-88f72bd411ef1d5e69415712d225bba778d28d1c.tar.gz
forums-88f72bd411ef1d5e69415712d225bba778d28d1c.tar.bz2
forums-88f72bd411ef1d5e69415712d225bba778d28d1c.tar.xz
forums-88f72bd411ef1d5e69415712d225bba778d28d1c.zip
[ticket/11031] Convert timezones to new 3.1 timezone
PHPBB3-11031
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php4
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php7
2 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index da894d440a..9d59e7a6c9 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -136,7 +136,7 @@ $config_schema = array(
'avatar_max_width' => 'avatar_max_width',
'avatar_max_height' => 'avatar_max_height',
'default_dateformat' => 'phpbb_set_encoding(default_dateformat)',
- 'board_timezone' => 'board_timezone',
+ 'board_timezone' => 'phpbb_convert_timezone(board_timezone)',
'allow_privmsg' => 'not(privmsg_disable)',
'gzip_compress' => 'gzip_compress',
'coppa_enable' => '!is_empty(coppa_mail)',
@@ -896,7 +896,7 @@ if (!$get_info)
array('user_lastmark', 'users.user_lastvisit', 'intval'),
array('user_lang', $config['default_lang'], ''),
array('', 'users.user_lang', ''),
- array('user_timezone', 'users.user_timezone', 'floatval'),
+ array('user_timezone', 'users.user_timezone', 'phpbb_convert_timezone'),
array('user_dateformat', 'users.user_dateformat', array('function1' => 'phpbb_set_encoding', 'function2' => 'fill_dateformat')),
array('user_inactive_reason', '', 'phpbb_inactive_reason'),
array('user_inactive_time', '', 'phpbb_inactive_time'),
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index 8a06296b16..4076fe2a78 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -1926,3 +1926,10 @@ function phpbb_check_username_collisions()
$drop_sql = 'DROP TABLE ' . USERCONV_TABLE;
$db->sql_query($drop_sql);
}
+
+function phpbb_convert_timezone($timezone)
+{
+ global $config, $db, $phpbb_root_path, $phpEx, $table_prefix;
+ $timezone_migration = new \phpbb\db\migration\data\v310\timezone($config, $db, new \phpbb\db\tools($db), $phpbb_root_path, $phpEx, $table_prefix);
+ return $timezone_migration->convert_phpbb30_timezone($timezone, 0);
+}