1
0
Fork 0
mirror of https://github.com/Findus23/plugin-ProfileAvatar.git synced 2024-09-19 15:23:45 +02:00

Matomo 5 compatibility

This commit is contained in:
Lukas Winkler 2023-07-22 23:25:08 +02:00
parent 1d16146ce1
commit 49099ef3e6
Signed by: lukas
GPG key ID: 54DE4D798D244853
3 changed files with 12 additions and 4 deletions

View file

@ -1,5 +1,13 @@
## Changelog ## Changelog
### 0.2.0
Matomo 5 compatibility
### 0.1.6
add French, Japanese, Italian, Portuguese, Portuguese (Brazil) and Ukrainian translations
### 0.1.5 ### 0.1.5
add German, Greek and Turkish translations add German, Greek and Turkish translations

View file

@ -2,7 +2,6 @@
namespace Piwik\Plugins\ProfileAvatar; namespace Piwik\Plugins\ProfileAvatar;
use Piwik\Common;
use Piwik\Piwik; use Piwik\Piwik;
class Controller extends \Piwik\Plugin\Controller class Controller extends \Piwik\Plugin\Controller
@ -13,7 +12,8 @@ class Controller extends \Piwik\Plugin\Controller
public function getProfileAvatar(): void public function getProfileAvatar(): void
{ {
Piwik::checkUserHasSomeViewAccess(); Piwik::checkUserHasSomeViewAccess();
$hash = Common::getRequestVar('hash', "", 'string'); $request = \Piwik\Request::fromRequest();
$hash = $request->getStringParameter('hash', "");
$settings = new UserSettings(); $settings = new UserSettings();
$chosenGenerator = $settings->avatarType->getValue(); $chosenGenerator = $settings->avatarType->getValue();
$generator = GeneratorCollection::getGeneratorClasses($chosenGenerator, $hash); $generator = GeneratorCollection::getGeneratorClasses($chosenGenerator, $hash);

View file

@ -1,10 +1,10 @@
{ {
"name": "ProfileAvatar", "name": "ProfileAvatar",
"description": "Show a random avatar on the Visitor Profile", "description": "Show a random avatar on the Visitor Profile",
"version": "0.1.5", "version": "0.2.0",
"theme": false, "theme": false,
"require": { "require": {
"matomo": ">=3.13.0,<5.0.0-b1" "matomo": ">=5.0.0-b1,<6.0.0-b1"
}, },
"authors": [ "authors": [
{ {