Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/UserCountry/LocationProvider.php1
-rwxr-xr-xtests/PHPUnit/Integration/ManyVisitorsOneWebsiteTest.php5
2 files changed, 6 insertions, 0 deletions
diff --git a/plugins/UserCountry/LocationProvider.php b/plugins/UserCountry/LocationProvider.php
index a364615338..3f6b8821ed 100755
--- a/plugins/UserCountry/LocationProvider.php
+++ b/plugins/UserCountry/LocationProvider.php
@@ -300,6 +300,7 @@ abstract class Piwik_UserCountry_LocationProvider
"Invalid provider ID '$providerId'. The provider either does not exist or is not available");
}
Piwik_SetOption(self::CURRENT_PROVIDER_OPTION_NAME, $providerId);
+ Piwik_Tracker_Cache::clearCacheGeneral();
return $provider;
}
diff --git a/tests/PHPUnit/Integration/ManyVisitorsOneWebsiteTest.php b/tests/PHPUnit/Integration/ManyVisitorsOneWebsiteTest.php
index 2ab755e75f..9185998624 100755
--- a/tests/PHPUnit/Integration/ManyVisitorsOneWebsiteTest.php
+++ b/tests/PHPUnit/Integration/ManyVisitorsOneWebsiteTest.php
@@ -203,6 +203,11 @@ class Test_Piwik_Integration_ManyVisitorsOneWebsiteTest extends IntegrationTestC
Piwik_UserCountry_LocationProvider::$providers = null;
Piwik_UserCountry_LocationProvider::setCurrentProvider(self::GEOIP_IMPL_TO_TEST);
+ if (Piwik_UserCountry_LocationProvider::getCurrentProviderId() !== self::GEOIP_IMPL_TO_TEST)
+ {
+ throw new Exception("Failed to set the current location provider to '".self::GEOIP_IMPL_TO_TEST."'.");
+ }
+
$possibleFiles = Piwik_UserCountry_LocationProvider_GeoIp::$dbNames['loc'];
if (Piwik_UserCountry_LocationProvider_GeoIp::getPathToGeoIpDatabase($possibleFiles) === false)
{