update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
47
www/analytics/core/Updates/2.10.0-b10.php
Normal file
47
www/analytics/core/Updates/2.10.0-b10.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?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_10_0_b10 extends Updates
|
||||
{
|
||||
|
||||
public function getMigrationQueries(Updater $updater)
|
||||
{
|
||||
$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 = 'DevicePlugins_plugin' WHERE name = 'UserSettings_plugin'"] = false;
|
||||
}
|
||||
|
||||
return $sqls;
|
||||
}
|
||||
|
||||
public function doUpdate(Updater $updater)
|
||||
{
|
||||
$pluginManager = \Piwik\Plugin\Manager::getInstance();
|
||||
|
||||
try {
|
||||
$pluginManager->activatePlugin('DevicePlugins');
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
|
||||
$updater->executeMigrationQueries(__FILE__, $this->getMigrationQueries($updater));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue