diff options
author | benakamoorthi <benaka.moorthi@gmail.com> | 2012-10-12 03:38:47 +0400 |
---|---|---|
committer | benakamoorthi <benaka.moorthi@gmail.com> | 2012-10-12 03:38:47 +0400 |
commit | 5963624355982508ebfc9bcd9ef0900ca24e193b (patch) | |
tree | 9d1ab6983115589faaaf9b445e960e4ed39a9c2a /plugins/UserCountry/functions.php | |
parent | ba0219e924790419a5717b073d354b02d16b1500 (diff) |
Refs #1823, fixed conversion tracking omission in initial GeoIP commit & added tests for conversion locations & unknown location. Removed 'Unknown' regions & cities from visitor log tooltips, added more detailed error messages for issues w/ the PECL module, add test w/ test IP and known result to isWorking methods and some more admin UI tweaks.
git-svn-id: http://dev.piwik.org/svn/trunk@7159 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/UserCountry/functions.php')
-rw-r--r-- | plugins/UserCountry/functions.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/UserCountry/functions.php b/plugins/UserCountry/functions.php index e714561d34..8d6074dd56 100644 --- a/plugins/UserCountry/functions.php +++ b/plugins/UserCountry/functions.php @@ -139,7 +139,12 @@ function Piwik_UserCountry_getPrettyCityName( $label ) return $label; } - list($cityName, $regionCode, $countryCode, $lat, $long) = explode(Piwik_UserCountry::LOCATION_SEPARATOR, $label); + // get city name, region code & country code + $parts = explode(Piwik_UserCountry::LOCATION_SEPARATOR, $label); + $cityName = $parts[0]; + $regionCode = $parts[1]; + $countryCode = $parts[2]; + if ($cityName == Piwik_UserCountry::UNKNOWN_CODE || $cityName == '') { $cityName = Piwik_Translate('General_Unknown'); |