3.12.0-b1.php
5 years ago
3.12.0-b7.php
5 years ago
4.0.0-b1.php
5 years ago
4.0.0-b3.php
5 years ago
4.0.0-rc3.php
5 years ago
4.0.0-rc4.php
5 years ago
4.0.1-b1.php
5 years ago
4.0.4-b1.php
5 years ago
4.1.2-b1.php
5 years ago
4.1.2-b2.php
5 years ago
4.3.0-b3.php
5 years ago
4.3.0-b4.php
5 years ago
4.3.0-rc2.php
5 years ago
4.4.0-b1.php
5 years ago
4.0.1-b1.php
57 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Matomo - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | * |
| 8 | */ |
| 9 | |
| 10 | namespace Piwik\Updates; |
| 11 | |
| 12 | use Piwik\Common; |
| 13 | use Piwik\Config; |
| 14 | use Piwik\Container\StaticContainer; |
| 15 | use Piwik\DataAccess\ArchiveTableCreator; |
| 16 | use Piwik\Date; |
| 17 | use Piwik\DbHelper; |
| 18 | use Piwik\Plugin\ReleaseChannels; |
| 19 | use Piwik\SettingsPiwik; |
| 20 | use Piwik\Updater; |
| 21 | use Piwik\Updates as PiwikUpdates; |
| 22 | use Piwik\Updater\Migration\Factory as MigrationFactory; |
| 23 | |
| 24 | class Updates_4_0_1_b1 extends PiwikUpdates |
| 25 | { |
| 26 | /** |
| 27 | * @var MigrationFactory |
| 28 | */ |
| 29 | private $migration; |
| 30 | |
| 31 | public function __construct(MigrationFactory $factory) |
| 32 | { |
| 33 | $this->migration = $factory; |
| 34 | } |
| 35 | |
| 36 | public function getMigrations(Updater $updater) |
| 37 | { |
| 38 | $migrations = []; |
| 39 | |
| 40 | $table = Common::prefixTable('user_token_auth'); |
| 41 | $migrations[] = $this->migration->db->sql('UPDATE ' . $table . ' SET hash_algo = "sha512" where hash_algo is null or hash_algo = "" '); |
| 42 | |
| 43 | if (SettingsPiwik::isGitDeployment()) { |
| 44 | return $migrations; |
| 45 | } |
| 46 | |
| 47 | $migrations[] = $this->migration->plugin->uninstall('ExampleTheme'); |
| 48 | return $migrations; |
| 49 | } |
| 50 | |
| 51 | public function doUpdate(Updater $updater) |
| 52 | { |
| 53 | $updater->executeMigrations(__FILE__, $this->getMigrations($updater)); |
| 54 | } |
| 55 | |
| 56 | } |
| 57 |