diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-08-11 13:19:59 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-08-11 13:19:59 +0400 |
commit | f9b15e948fc9639ada0f925a5d450e6e158b5f56 (patch) | |
tree | 3d6a25c8a271deee7d1136a11c11926be1d33529 /plugins/UserCountryMap | |
parent | a96ec40e983a8b64f4c25def541a519ff3670e6a (diff) | |
parent | 64ca5d548c0cf0c4eef9f5f104901fbf14800127 (diff) |
Merge remote-tracking branch 'origin/master' into plugin_namespaces
Conflicts:
core/Tracker/Request.php
core/ViewDataTable.php
core/ViewDataTable/HtmlTable/Goals.php
plugins/Actions/Actions.php
plugins/Annotations/API.php
plugins/CoreHome/CoreHome.php
plugins/DBStats/DBStats.php
plugins/DevicesDetection/DevicesDetection.php
plugins/Goals/Goals.php
plugins/Live/Live.php
plugins/Referers/Referers.php
plugins/UserSettings/UserSettings.php
plugins/UsersManager/API.php
plugins/VisitTime/VisitTime.php
plugins/VisitorInterest/VisitorInterest.php
Diffstat (limited to 'plugins/UserCountryMap')
-rw-r--r-- | plugins/UserCountryMap/Controller.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/UserCountryMap/Controller.php b/plugins/UserCountryMap/Controller.php index 187aeb9302..50ce58e31a 100644 --- a/plugins/UserCountryMap/Controller.php +++ b/plugins/UserCountryMap/Controller.php @@ -30,7 +30,7 @@ class Controller extends \Piwik\Controller // By default plot up to the last 30 days of visitors on the map, for low traffic sites const REAL_TIME_WINDOW = 'last30'; - public function visitorMap() + public function visitorMap($fetch = false) { $this->checkUserCountryPluginEnabled(); @@ -39,6 +39,7 @@ class Controller extends \Piwik\Controller $period = Common::getRequestVar('period'); $date = Common::getRequestVar('date'); + $segment = Common::getRequestVar('segment', '', 'string'); $token_auth = Piwik::getCurrentUserTokenAuth(); $view = new View('@UserCountryMap/visitorMap'); @@ -81,6 +82,7 @@ class Controller extends \Piwik\Controller 'period' => $period, 'idSite' => $idSite, 'date' => $date, + 'segment' => $segment, 'token_auth' => $token_auth, 'enable_filter_excludelowpop' => 1, 'filter_excludelowpop_value' => -1 @@ -92,7 +94,11 @@ class Controller extends \Piwik\Controller $view->config = Common::json_encode($config); $view->noData = empty($config['visitsSummary']['nb_visits']); - echo $view->render(); + if ($fetch) { + return $view->render(); + } else { + echo $view->render(); + } } /** @@ -209,7 +215,7 @@ class Controller extends \Piwik\Controller . "&period=" . $period . "&date=" . $date . "&token_auth=" . $token_auth - . "&segment=" . \Piwik\API\Request::getRawSegmentFromRequest() + . "&segment=" . Common::getRequestVar('segment', '', 'string') . "&enable_filter_excludelowpop=1" . "&showRawMetrics=1"; |