Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Updates/0.9.1.php')
-rw-r--r--core/Updates/0.9.1.php60
1 files changed, 29 insertions, 31 deletions
diff --git a/core/Updates/0.9.1.php b/core/Updates/0.9.1.php
index 2ad423b8d3..24e6c27c60 100644
--- a/core/Updates/0.9.1.php
+++ b/core/Updates/0.9.1.php
@@ -14,42 +14,40 @@
*/
class Piwik_Updates_0_9_1 extends Piwik_Updates
{
- static function getSql($schema = 'Myisam')
- {
- if(!Piwik::isTimezoneSupportEnabled())
- {
- return array();
- }
- // @see http://bugs.php.net/46111
- $timezones = timezone_identifiers_list();
- $brokenTZ = array();
+ static function getSql($schema = 'Myisam')
+ {
+ if (!Piwik::isTimezoneSupportEnabled()) {
+ return array();
+ }
+ // @see http://bugs.php.net/46111
+ $timezones = timezone_identifiers_list();
+ $brokenTZ = array();
- foreach ($timezones as $timezone) {
- $testDate = "2008-08-19 13:00:00 " . $timezone;
-
- if (!strtotime($testDate)) {
- $brokenTZ[] = $timezone;
- }
- }
- $timezoneList = '"'. implode('","', $brokenTZ) . '"';
+ foreach ($timezones as $timezone) {
+ $testDate = "2008-08-19 13:00:00 " . $timezone;
- return array(
- 'UPDATE '. Piwik_Common::prefixTable('site') .'
+ if (!strtotime($testDate)) {
+ $brokenTZ[] = $timezone;
+ }
+ }
+ $timezoneList = '"' . implode('","', $brokenTZ) . '"';
+
+ return array(
+ 'UPDATE ' . Piwik_Common::prefixTable('site') . '
SET timezone = "UTC"
- WHERE timezone IN ('. $timezoneList .')' => false,
+ WHERE timezone IN (' . $timezoneList . ')' => false,
- 'UPDATE `'. Piwik_Common::prefixTable('option') .'`
+ 'UPDATE `' . Piwik_Common::prefixTable('option') . '`
SET option_value = "UTC"
WHERE option_name = "SitesManager_DefaultTimezone"
- AND option_value IN ('. $timezoneList .')' => false,
- );
- }
+ AND option_value IN (' . $timezoneList . ')' => false,
+ );
+ }
- static function update()
- {
- if(Piwik::isTimezoneSupportEnabled())
- {
- Piwik_Updater::updateDatabase(__FILE__, self::getSql());
- }
- }
+ static function update()
+ {
+ if (Piwik::isTimezoneSupportEnabled()) {
+ Piwik_Updater::updateDatabase(__FILE__, self::getSql());
+ }
+ }
}