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
path: root/core
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-11-26 07:00:52 +0300
committerGitHub <noreply@github.com>2020-11-26 07:00:52 +0300
commitc3cb22117048ac18c8973af3da32f9697597c24b (patch)
treeed3aaf4bda03ad6886a317d1e426340b127e687b /core
parentd9932eda35100ee9381e9835493757d15e947e49 (diff)
Remove ExampleTheme plugin on update (#16807)
* Remove ExampleTheme plugin on update We already deactivate the plugin but it looks like we actually need to fully remove the plugin. It should only be removed if it was not installed through git as in git we still have it. * Update Version.php
Diffstat (limited to 'core')
-rw-r--r--core/Updates/4.0.1-b1.php51
-rw-r--r--core/Version.php2
2 files changed, 52 insertions, 1 deletions
diff --git a/core/Updates/4.0.1-b1.php b/core/Updates/4.0.1-b1.php
new file mode 100644
index 0000000000..3f44780afe
--- /dev/null
+++ b/core/Updates/4.0.1-b1.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+
+namespace Piwik\Updates;
+
+use Piwik\Config;
+use Piwik\Container\StaticContainer;
+use Piwik\DataAccess\ArchiveTableCreator;
+use Piwik\Date;
+use Piwik\DbHelper;
+use Piwik\Plugin\ReleaseChannels;
+use Piwik\SettingsPiwik;
+use Piwik\Updater;
+use Piwik\Updates as PiwikUpdates;
+use Piwik\Updater\Migration\Factory as MigrationFactory;
+
+class Updates_4_0_1_b1 extends PiwikUpdates
+{
+ /**
+ * @var MigrationFactory
+ */
+ private $migration;
+
+ public function __construct(MigrationFactory $factory)
+ {
+ $this->migration = $factory;
+ }
+
+ public function getMigrations(Updater $updater)
+ {
+ $migrations = [];
+ if (SettingsPiwik::isGitDeployment()) {
+ return $migrations;
+ }
+
+ $migrations[] = $this->migration->plugin->uninstall('ExampleTheme');
+ return $migrations;
+ }
+
+ public function doUpdate(Updater $updater)
+ {
+ $updater->executeMigrations(__FILE__, $this->getMigrations($updater));
+ }
+
+}
diff --git a/core/Version.php b/core/Version.php
index 4241c9ef8b..339dbe4052 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -20,7 +20,7 @@ final class Version
* The current Matomo version.
* @var string
*/
- const VERSION = '4.0.0';
+ const VERSION = '4.0.1-b1';
const MAJOR_VERSION = 4;
public function isStableVersion($version)