mirror of
https://github.com/Findus23/plugin-ExcludeCountries.git
synced 2024-09-19 15:53:47 +02:00
fix getting country codes from settings
This commit is contained in:
parent
f4f11a5f23
commit
fe90e98eb4
3 changed files with 7 additions and 3 deletions
|
@ -1,5 +1,9 @@
|
|||
## Changelog
|
||||
|
||||
### 0.1.3
|
||||
|
||||
fix bug causing no countries to be selected
|
||||
|
||||
### 0.1.2
|
||||
|
||||
fix release
|
||||
|
|
|
@ -66,8 +66,8 @@ class ExcludeCountries extends Plugin
|
|||
private function settingToCountryCodes(Setting $setting) {
|
||||
$codes = [];
|
||||
foreach ($setting->getValue() as $value) {
|
||||
if (!empty($value["languageCode"])) {
|
||||
$codes[] = $value["languageCode"];
|
||||
if (!empty($value["country"])) {
|
||||
$codes[] = $value["country"];
|
||||
}
|
||||
}
|
||||
return $codes;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "ExcludeCountries",
|
||||
"description": "Exclude or include visitors from selected countries",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"theme": false,
|
||||
"require": {
|
||||
"piwik": ">=3.10.0,<4.0.0-b1"
|
||||
|
|
Loading…
Reference in a new issue