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:
authorMatthieu Aubry <matt@piwik.org>2013-12-13 11:58:11 +0400
committerMatthieu Aubry <matt@piwik.org>2013-12-13 11:58:11 +0400
commit00854ac558573eb7c345fd2ec6998ea849ced7c5 (patch)
tree3e5d1cf7faed002f20cc3af2f022818cfe13039f /core
parente485581185414ef986b2f914303f221e4949954a (diff)
parent8b2682ac4deb5803c9cf2329396a9ae53ac1066d (diff)
Merge pull request #167 from pebosi/remove_libs
Remove old lib directories when updating from 1.12 -- thanks for fixing the namespace bug too!
Diffstat (limited to 'core')
-rw-r--r--core/Tracker/ActionClickUrl.php3
-rw-r--r--core/Updates/2.0-b13.php45
2 files changed, 47 insertions, 1 deletions
diff --git a/core/Tracker/ActionClickUrl.php b/core/Tracker/ActionClickUrl.php
index 1cfeba76bb..76ead8a31c 100644
--- a/core/Tracker/ActionClickUrl.php
+++ b/core/Tracker/ActionClickUrl.php
@@ -11,6 +11,7 @@
namespace Piwik\Tracker;
+use Piwik\Common;
use Piwik\Tracker;
/**
@@ -62,4 +63,4 @@ class ActionClickUrl extends Action
}
return Visit::isHostKnownAliasHost($actionUrlParsed['host'], $idSite);
}
-} \ No newline at end of file
+}
diff --git a/core/Updates/2.0-b13.php b/core/Updates/2.0-b13.php
new file mode 100644
index 0000000000..07c7503085
--- /dev/null
+++ b/core/Updates/2.0-b13.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ * @category Piwik
+ * @package Piwik
+ */
+namespace Piwik\Updates;
+
+use Piwik\Filesystem;
+use Piwik\Updates;
+
+/**
+ * @package Updates
+ */
+class Updates_2_0_b13 extends Updates
+{
+ public static function update()
+ {
+ $errors = array();
+
+ // Deleting old libs
+ $obsoleteDirectories = array(
+ PIWIK_INCLUDE_PATH . '/libs/Smarty',
+ PIWIK_INCLUDE_PATH . '/libs/Event',
+ );
+
+ foreach ($obsoleteDirectories as $dir) {
+ if (file_exists($dir)) {
+ Filesystem::unlinkRecursive($dir, true);
+ }
+
+ if (file_exists($dir)) {
+ $errors[] = "Please delete this directory manually (eg. using your FTP software): $dir \n";
+ }
+
+ }
+ if(!empty($errors)) {
+ throw new \Exception("Warnings during the update: <br>" . implode("<br>", $errors));
+ }
+ }
+}