mirror of
https://github.com/Findus23/plugin-ExcludeCountries.git
synced 2024-09-19 15:53:47 +02:00
parent
fe90e98eb4
commit
865b72a383
2 changed files with 5 additions and 2 deletions
|
@ -45,7 +45,10 @@ class ExcludeCountries extends Plugin
|
||||||
|
|
||||||
$location = $provider->getLocation(["ip" => $request->getIp()]);
|
$location = $provider->getLocation(["ip" => $request->getIp()]);
|
||||||
$countryCode = strtolower($location[LocationProvider::COUNTRY_CODE_KEY]);
|
$countryCode = strtolower($location[LocationProvider::COUNTRY_CODE_KEY]);
|
||||||
|
if (!$location || empty($countryCode)) {
|
||||||
|
$logger->debug("ExcludeCountries could not detect a location");
|
||||||
|
return;
|
||||||
|
}
|
||||||
$excludeBool = $settings->excludeBool->getValue();
|
$excludeBool = $settings->excludeBool->getValue();
|
||||||
|
|
||||||
if ($excludeBool) {
|
if ($excludeBool) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "ExcludeCountries",
|
"name": "ExcludeCountries",
|
||||||
"description": "Exclude or include visitors from selected countries",
|
"description": "Exclude or include visitors from selected countries",
|
||||||
"version": "0.1.3",
|
"version": "0.1.4",
|
||||||
"theme": false,
|
"theme": false,
|
||||||
"require": {
|
"require": {
|
||||||
"piwik": ">=3.10.0,<4.0.0-b1"
|
"piwik": ">=3.10.0,<4.0.0-b1"
|
||||||
|
|
Loading…
Reference in a new issue