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:
authorbenakamoorthi <benaka.moorthi@gmail.com>2012-10-10 20:47:41 +0400
committerbenakamoorthi <benaka.moorthi@gmail.com>2012-10-10 20:47:41 +0400
commit2bd2cea5b2ad93b1e3bb14ca728e93fde6282549 (patch)
tree1368fce9e4312e44bea77770317504d3212333ed /plugins/Live/Visitor.php
parentb3d34856c8fc2f9a3d9a37eb688a9be1d559f347 (diff)
Refs #1823, several changes & tweaks to GeoIP modifications:
* Renamed getVisitsByCity & getVisitsByRegion to getCity & getRegion. * Extra testing for anonymized IPs. * Show visitor city & region in visitor log & last visits widget. * Do specific check for apache module in checking for server based geoip implementation. * Fix for continent segment error. * Redesigned admin UI to be more compact & to show reason for broken implementations. * Don't show duplicate Unknowns in pretty location strings. * Don't use REMOTE_ADDR, instead get IP from Piwik_IP. git-svn-id: http://dev.piwik.org/svn/trunk@7140 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Live/Visitor.php')
-rw-r--r--plugins/Live/Visitor.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/Live/Visitor.php b/plugins/Live/Visitor.php
index db8a3456ea..0992942dbb 100644
--- a/plugins/Live/Visitor.php
+++ b/plugins/Live/Visitor.php
@@ -74,6 +74,7 @@ class Piwik_Live_Visitor
'country' => $this->getCountryName(),
'countryFlag' => $this->getCountryFlag(),
'continent' => $this->getContinent(),
+ 'location' => $this->getPrettyLocation(),
'provider' => $this->getProvider(),
'providerUrl' => $this->getProviderUrl(),
'referrerType' => $this->getRefererType(),
@@ -216,6 +217,14 @@ class Piwik_Live_Visitor
{
return Piwik_ContinentTranslate(Piwik_Common::getContinent($this->details['location_country']));
}
+
+ function getPrettyLocation()
+ {
+ $label = $this->details['location_city'].Piwik_UserCountry::LOCATION_SEPARATOR
+ . $this->details['location_region'].Piwik_UserCountry::LOCATION_SEPARATOR
+ . $this->details['location_country'];
+ return Piwik_UserCountry_getPrettyCityName($label);
+ }
function getCustomVariables()
{