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 <tsteur@users.noreply.github.com>2018-11-29 10:22:15 +0300
committerGitHub <noreply@github.com>2018-11-29 10:22:15 +0300
commit73010596f01b9660899267305fe0cf5064428753 (patch)
tree367851f6c476d10f51c0a2a8756f02d260583d83 /core/DbHelper.php
parent970883b106229f11a071c5470538bfb29dc83871 (diff)
Make matomo.js and matomo.php the default Tracking API endpoints used (#13596)
* Make matomo.js and matomo.php the default Tracking API endpoints used * few fixes * fix few tests * update matomo php tracker in composer * make sure to record install version * do not overwrite ever install version * trying to fix test * more tweaks and fix tests * prefer matomo endpoint in the ui, fix some tests * file was still needed * apply review feedback * fix ui tests
Diffstat (limited to 'core/DbHelper.php')
-rw-r--r--core/DbHelper.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/core/DbHelper.php b/core/DbHelper.php
index 1687cc89e8..fdbbf3bd1f 100644
--- a/core/DbHelper.php
+++ b/core/DbHelper.php
@@ -94,6 +94,31 @@ class DbHelper
}
/**
+ * Records the Matomo version a user used when installing this Matomo for the first time
+ */
+ public static function recordInstallVersion()
+ {
+ Schema::getInstance()->recordInstallVersion();
+ }
+
+ /**
+ * Returns which Matomo version was used to install this Matomo for the first time.
+ */
+ public static function getInstallVersion()
+ {
+ return Schema::getInstance()->getInstallVersion();
+ }
+
+ public static function wasMatomoInstalledBeforeVersion($version)
+ {
+ $installVersion = self::getInstallVersion();
+ if (empty($installVersion)) {
+ return true; // we assume yes it was installed
+ }
+ return true === version_compare($version, $installVersion, '>');
+ }
+
+ /**
* Create all tables
*/
public static function createTables()