diff options
author | sgiehl <stefan@piwik.org> | 2015-01-13 01:13:14 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-01-13 01:13:14 +0300 |
commit | a0ce768662bea281f88fb64b90a9fca4d668fd41 (patch) | |
tree | 17fd24f16111dc61fd04d4f4d63b950d97b7e4c3 /core | |
parent | e2b9956e4bd92ca9e234d10d527be9e8caf2b68f (diff) |
refs #3962 - moved language reports to their own plugin
Diffstat (limited to 'core')
-rw-r--r-- | core/Plugin/Report.php | 2 | ||||
-rw-r--r-- | core/Updates/2.11.0-b3.php | 49 | ||||
-rw-r--r-- | core/Version.php | 2 | ||||
-rw-r--r-- | core/WidgetsList.php | 2 |
4 files changed, 52 insertions, 3 deletions
diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php index 64a0ce603b..9a78bcdbf1 100644 --- a/core/Plugin/Report.php +++ b/core/Plugin/Report.php @@ -196,7 +196,7 @@ class Report 'Goals_Goals', 'General_Visitors', 'DevicesDetection_DevicesDetection', - 'UserSettings_VisitorSettings', + 'General_VisitorSettings', 'API' ); diff --git a/core/Updates/2.11.0-b3.php b/core/Updates/2.11.0-b3.php new file mode 100644 index 0000000000..8a2d78c3e7 --- /dev/null +++ b/core/Updates/2.11.0-b3.php @@ -0,0 +1,49 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ + +namespace Piwik\Updates; + +use Piwik\DataAccess\ArchiveTableCreator; +use Piwik\Updater; +use Piwik\Updates; + +class Updates_2_11_0_b3 extends Updates +{ + + static function getSql() + { + $sqls = array(); + + $archiveTables = ArchiveTableCreator::getTablesArchivesInstalled(); + + $archiveBlobTables = array_filter($archiveTables, function($name) { + return ArchiveTableCreator::getTypeFromTableName($name) == ArchiveTableCreator::BLOB_TABLE; + }); + + foreach ($archiveBlobTables as $table) { + + $sqls["UPDATE " . $table . " SET name = 'UserLanguage_language' WHERE name = 'UserSettings_language'"] = false; + } + + return $sqls; + } + + static function update() + { + $pluginManager = \Piwik\Plugin\Manager::getInstance(); + + try { + $pluginManager->activatePlugin('UserLanguage'); + } catch(\Exception $e) { + } + + Updater::updateDatabase(__FILE__, self::getSql()); + } + +} diff --git a/core/Version.php b/core/Version.php index 393f081a15..179d6fd541 100644 --- a/core/Version.php +++ b/core/Version.php @@ -20,5 +20,5 @@ final class Version * The current Piwik version. * @var string */ - const VERSION = '2.11.0-b2'; + const VERSION = '2.11.0-b3'; } diff --git a/core/WidgetsList.php b/core/WidgetsList.php index c474061606..e91a0f2b38 100644 --- a/core/WidgetsList.php +++ b/core/WidgetsList.php @@ -138,7 +138,7 @@ class WidgetsList extends Singleton 'VisitsSummary_VisitsSummary', 'Live!', 'General_Visitors', - 'UserSettings_VisitorSettings', + 'General_VisitorSettings', 'DevicesDetection_DevicesDetection', 'General_Actions', 'Events_Events', |