diff options
-rw-r--r-- | plugins/Live/API.php | 2 | ||||
-rw-r--r-- | plugins/Live/Controller.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Live/API.php b/plugins/Live/API.php index 53a9f57334..4469eb6cec 100644 --- a/plugins/Live/API.php +++ b/plugins/Live/API.php @@ -328,8 +328,8 @@ class API extends \Piwik\Plugin\API $result['lastVisit'] = $this->getVisitorProfileVisitSummary(reset($rows)); // check if requested visits have lat/long - $result['hasLatLong'] = false; if ($checkForLatLong) { + $result['hasLatLong'] = false; foreach ($rows as $visit) { if ($visit->getColumn('latitude') !== false) { // realtime map only checks for latitude $result['hasLatLong'] = true; diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php index 31f23678ce..900010f157 100644 --- a/plugins/Live/Controller.php +++ b/plugins/Live/Controller.php @@ -143,7 +143,7 @@ class Controller extends \Piwik\Plugin\Controller $view->exportLink = $this->getVisitorProfileExportLink(); if (Common::getRequestVar('showMap', 1) == 1 - && $view->visitorData['hasLatLong'] + && !empty($view->visitorData['hasLatLong']) && \Piwik\Plugin\Manager::getInstance()->isPluginLoaded('UserCountryMap') ) { $view->userCountryMapUrl = $this->getUserCountryMapUrlForVisitorProfile(); |