From 49099ef3e611f7ccb72c987f87cc7924fd82b65a Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Sat, 22 Jul 2023 23:25:08 +0200 Subject: [PATCH] Matomo 5 compatibility --- CHANGELOG.md | 8 ++++++++ Controller.php | 4 ++-- plugin.json | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7c6568..04eb2b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ ## Changelog +### 0.2.0 + +Matomo 5 compatibility + +### 0.1.6 + +add French, Japanese, Italian, Portuguese, Portuguese (Brazil) and Ukrainian translations + ### 0.1.5 add German, Greek and Turkish translations diff --git a/Controller.php b/Controller.php index 9313181..2b84e6d 100644 --- a/Controller.php +++ b/Controller.php @@ -2,7 +2,6 @@ namespace Piwik\Plugins\ProfileAvatar; -use Piwik\Common; use Piwik\Piwik; class Controller extends \Piwik\Plugin\Controller @@ -13,7 +12,8 @@ class Controller extends \Piwik\Plugin\Controller public function getProfileAvatar(): void { Piwik::checkUserHasSomeViewAccess(); - $hash = Common::getRequestVar('hash', "", 'string'); + $request = \Piwik\Request::fromRequest(); + $hash = $request->getStringParameter('hash', ""); $settings = new UserSettings(); $chosenGenerator = $settings->avatarType->getValue(); $generator = GeneratorCollection::getGeneratorClasses($chosenGenerator, $hash); diff --git a/plugin.json b/plugin.json index dac4e9f..b6ace3d 100644 --- a/plugin.json +++ b/plugin.json @@ -1,10 +1,10 @@ { "name": "ProfileAvatar", "description": "Show a random avatar on the Visitor Profile", - "version": "0.1.5", + "version": "0.2.0", "theme": false, "require": { - "matomo": ">=3.13.0,<5.0.0-b1" + "matomo": ">=5.0.0-b1,<6.0.0-b1" }, "authors": [ {