From e59dc596649e5bd9eaa54076f7458281c2c26760 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 7 Feb 2016 22:55:52 +0900 Subject: [PATCH] Misc fixes to install module --- modules/install/install.controller.php | 18 ++++++++++++++++-- modules/install/tpl/js/install.js | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index 726a85e5a..a77ac0f1f 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -161,10 +161,11 @@ class installController extends install $config['locale']['default_lang'] = Context::getLangType(); $config['locale']['enabled_lang'] = array($config['locale']['default_lang']); - // Set the internal and default time zones. + // Set the default time zone. if (strpos($time_zone, '/') !== false) { $config['locale']['default_timezone'] = $time_zone; + $user_timezone = null; } else { @@ -179,7 +180,20 @@ class installController extends install $config['locale']['default_timezone'] = 'Etc/GMT' . ($user_timezone > 0 ? '-' : '+') . abs($user_timezone); } } - $config['locale']['internal_timezone'] = intval(date('Z')); + + // Set the internal time zone. + if ($config['locale']['default_timezone'] === 'Asia/Seoul') + { + $config['locale']['internal_timezone'] = 32400; + } + elseif ($user_timezone !== null) + { + $config['locale']['internal_timezone'] = $user_timezone * 3600; + } + else + { + $config['locale']['internal_timezone'] = 0; + } // Set the default URL. $config['url']['default'] = Context::getRequestUri(); diff --git a/modules/install/tpl/js/install.js b/modules/install/tpl/js/install.js index 05fbdcbe0..7146adcb8 100644 --- a/modules/install/tpl/js/install.js +++ b/modules/install/tpl/js/install.js @@ -41,6 +41,7 @@ jQuery(function($){ $("#task-complete-install").click(function() { $("#task-complete-install").text($("#task-complete-install").data("installing")); $("#task-complete-install").prop("disabled", true); + $(window).on("beforeunload", function() { return ""; }); }); } });