diff options
author | diosmosis <benaka@piwik.pro> | 2015-03-11 14:57:22 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-03-11 14:57:22 +0300 |
commit | 1caf60c21989651d6b8e0cc5de14a41f5448b6a0 (patch) | |
tree | 170a4ea89fce6fadc47c130944df3934afc831f0 /plugins | |
parent | e477518993e1c59dc36f0c05d22dcf85942d4e07 (diff) |
Name variables that store VisitorGeolocator instances to visitorGeolocator instead of locationFetcher.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/UserCountry/Columns/Base.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/UserCountry/Columns/Base.php b/plugins/UserCountry/Columns/Base.php index d28db0e426..d0a3b58118 100644 --- a/plugins/UserCountry/Columns/Base.php +++ b/plugins/UserCountry/Columns/Base.php @@ -23,7 +23,7 @@ abstract class Base extends VisitDimension /** * @var VisitorGeolocator */ - private $locationFetcher; + private $visitorGeolocator; protected function getUrlOverrideValueIfAllowed($urlParamToOverride, Request $request) { @@ -46,10 +46,8 @@ abstract class Base extends VisitDimension protected function getLocationDetail($userInfo, $locationKey) { - $location = $this->getLocationFetcher()->getLocation( - $userInfo, - empty($GLOBALS['PIWIK_TRACKER_LOCAL_TRACKING']) - ); + $useLocationCache = empty($GLOBALS['PIWIK_TRACKER_LOCAL_TRACKING']); + $location = $this->getVisitorGeolocator()->getLocation($userInfo, $useLocationCache); if (!isset($location[$locationKey])) { return false; @@ -58,13 +56,13 @@ abstract class Base extends VisitDimension return $location[$locationKey]; } - protected function getLocationFetcher() + protected function getVisitorGeolocator() { - if ($this->locationFetcher === null) { - $this->locationFetcher = new VisitorGeolocator(); + if ($this->visitorGeolocator === null) { + $this->visitorGeolocator = new VisitorGeolocator(); } - return $this->locationFetcher; + return $this->visitorGeolocator; } protected function getUserInfo(Request $request, Visitor $visitor) |