1
0
Fork 0
mirror of https://github.com/Findus23/plugin-QuickExcludeVisitorIP.git synced 2024-09-19 15:53:44 +02:00

Matomo 5 compatibility

This commit is contained in:
Lukas Winkler 2023-07-22 23:30:04 +02:00
parent 6d95fdb12b
commit 3aab1f219f
Signed by: lukas
GPG key ID: 54DE4D798D244853
3 changed files with 11 additions and 5 deletions

View file

@ -1,10 +1,15 @@
## Changelog ## Changelog
# 0.1.1 ### 0.2.0
Matomo 5 compatibility
release version
### 0.1.1
release version release version
# 0.1.0 ### 0.1.0
first beta version first beta version

View file

@ -29,7 +29,8 @@ class Controller extends \Piwik\Plugin\Controller
{ {
Piwik::checkUserHasSuperUserAccess(); Piwik::checkUserHasSuperUserAccess();
@header('Content-Type: application/json; charset=utf-8'); @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(); $ignoredIPstr = APISitesManager::getInstance()->getExcludedIpsGlobal();
$ignoredIPs = explode(",", $ignoredIPstr); $ignoredIPs = explode(",", $ignoredIPstr);
if (in_array($ip, $ignoredIPs)) { if (in_array($ip, $ignoredIPs)) {

View file

@ -1,10 +1,10 @@
{ {
"name": "QuickExcludeVisitorIP", "name": "QuickExcludeVisitorIP",
"description": "Adds a button to Visitor Profile to quickly add them to the list of ignored IPs", "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, "theme": false,
"require": { "require": {
"piwik": ">=3.10.0,<5.0.0-b1" "matomo": ">=5.0.0-b1,<6.0.0-b1"
}, },
"authors": [ "authors": [
{ {