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:
authorThomas Steur <thomas.steur@gmail.com>2015-07-21 11:51:16 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-07-21 11:51:16 +0300
commit764b3b80bef6e54c08b4875c97034fcfacd1d55c (patch)
treee96f8f1902e3def4573a9a12c1b3b5d055b2146d /core/Updater.php
parentd0c93e6fa77bdcfdab2d3cb66301a5144fd3addd (diff)
refs #8304 make sure to not uninstall a dimension if another plugin defines the same, make sure to correctly mark the dimension as uninstalled
Diffstat (limited to 'core/Updater.php')
-rw-r--r--core/Updater.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/Updater.php b/core/Updater.php
index 9190320fa7..90c8c6839c 100644
--- a/core/Updater.php
+++ b/core/Updater.php
@@ -91,6 +91,21 @@ class Updater
}
/**
+ * Marks a component as successfully uninstalled. Deletes an option
+ * that looks like `"version_$componentName"`.
+ *
+ * @param string $name The component name. Eg, a plugin name, `'core'` or dimension column name.
+ */
+ public function markComponentSuccessfullyUninstalled($name)
+ {
+ try {
+ Option::delete(self::getNameInOptionTable($name));
+ } catch (\Exception $e) {
+ // case when the option table is not yet created (before 0.2.10)
+ }
+ }
+
+ /**
* Returns the currently installed version of a Piwik component.
*
* @param string $name The component name. Eg, a plugin name, `'core'` or dimension column name.