From 3aab1f219f6b038f6c20be44c1d134df094fd0fe Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Sat, 22 Jul 2023 23:30:04 +0200 Subject: [PATCH] Matomo 5 compatibility --- CHANGELOG.md | 9 +++++++-- Controller.php | 3 ++- plugin.json | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90d0e9b..dfe1f65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,15 @@ ## Changelog -# 0.1.1 +### 0.2.0 + +Matomo 5 compatibility + +release version +### 0.1.1 release version -# 0.1.0 +### 0.1.0 first beta version diff --git a/Controller.php b/Controller.php index 2ef008f..530b801 100644 --- a/Controller.php +++ b/Controller.php @@ -29,7 +29,8 @@ class Controller extends \Piwik\Plugin\Controller { Piwik::checkUserHasSuperUserAccess(); @header('Content-Type: application/json; charset=utf-8'); - $ip = Common::getRequestVar('ip', null, 'string'); + $request = \Piwik\Request::fromRequest(); + $ip = $request->getStringParameter('ip', null); $ignoredIPstr = APISitesManager::getInstance()->getExcludedIpsGlobal(); $ignoredIPs = explode(",", $ignoredIPstr); if (in_array($ip, $ignoredIPs)) { diff --git a/plugin.json b/plugin.json index 144a14a..f41eca5 100644 --- a/plugin.json +++ b/plugin.json @@ -1,10 +1,10 @@ { "name": "QuickExcludeVisitorIP", "description": "Adds a button to Visitor Profile to quickly add them to the list of ignored IPs", - "version": "0.1.1", + "version": "0.2.0", "theme": false, "require": { - "piwik": ">=3.10.0,<5.0.0-b1" + "matomo": ">=5.0.0-b1,<6.0.0-b1" }, "authors": [ {