diff options
author | benakamoorthi <benaka.moorthi@gmail.com> | 2012-10-20 09:27:03 +0400 |
---|---|---|
committer | benakamoorthi <benaka.moorthi@gmail.com> | 2012-10-20 09:27:03 +0400 |
commit | f3514dbd33de6a0adbd220ff701052f72af06fce (patch) | |
tree | 268bc16d72c819f406ee9de8cb12f62c5ae11cb4 /plugins/UserCountry | |
parent | b30e9ca9317a97bdc569ee0aa23db5b0715d735a (diff) |
Refs #1823, add alternative check for GEOIP_COUNTRY_CODE $_SERVER var to ServerBased GeoIP implementation.
git-svn-id: http://dev.piwik.org/svn/trunk@7260 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/UserCountry')
-rwxr-xr-x | plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php b/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php index 40c2226382..7b5b83537d 100755 --- a/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php +++ b/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php @@ -23,6 +23,7 @@ class Piwik_UserCountry_LocationProvider_GeoIp_ServerBased extends Piwik_UserCou const ID = 'geoip_serverbased'; const TITLE = 'GeoIP (%s)'; const TEST_SERVER_VAR = 'GEOIP_ADDR'; + const TEST_SERVER_VAR_ALT = 'GEOIP_COUNTRY_CODE'; private static $geoIpServerVars = array( parent::COUNTRY_CODE_KEY => 'GEOIP_COUNTRY_CODE', @@ -151,7 +152,8 @@ class Piwik_UserCountry_LocationProvider_GeoIp_ServerBased extends Piwik_UserCou } } - return !empty($_SERVER[self::TEST_SERVER_VAR]); + return !empty($_SERVER[self::TEST_SERVER_VAR]) + || !empty($_SERVER[self::TEST_SERVER_VAR_ALT]); } /** |