diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-14 19:56:20 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-14 19:56:39 +0400 |
commit | 323956875dffd6b04ab172fa70f90320fb2a0884 (patch) | |
tree | 114e0dd212c2d5d446108c44611c72c381ee847f /plugins/UserCountryMap | |
parent | 4cdb9571814fb40173d81ef4ed2ce4341e01aee7 (diff) |
Refs #3089, do not refresh visits in embedded realtime map in visitor profile..
Diffstat (limited to 'plugins/UserCountryMap')
-rw-r--r-- | plugins/UserCountryMap/Controller.php | 3 | ||||
-rw-r--r-- | plugins/UserCountryMap/javascripts/realtime-map.js | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/UserCountryMap/Controller.php b/plugins/UserCountryMap/Controller.php index a0a063719a..36c02002d1 100644 --- a/plugins/UserCountryMap/Controller.php +++ b/plugins/UserCountryMap/Controller.php @@ -183,7 +183,8 @@ class Controller extends \Piwik\Controller 'changeVisitAlpha' => Common::getRequestVar('changeVisitAlpha', true, 'int'), 'removeOldVisits' => Common::getRequestVar('removeOldVisits', true, 'int'), 'showFooterMessage' => Common::getRequestVar('showFooterMessage', true, 'int'), - 'showDateTime' => Common::getRequestVar('showDateTime', true, 'int') + 'showDateTime' => Common::getRequestVar('showDateTime', true, 'int'), + 'doNotRefreshVisits' => Common::getRequestVar('doNotRefreshVisits', false, 'int') ); if ($fetch) { diff --git a/plugins/UserCountryMap/javascripts/realtime-map.js b/plugins/UserCountryMap/javascripts/realtime-map.js index 8b7abf4c87..bccb4a43d2 100644 --- a/plugins/UserCountryMap/javascripts/realtime-map.js +++ b/plugins/UserCountryMap/javascripts/realtime-map.js @@ -80,6 +80,7 @@ maxVisits = config.maxVisits || 100, changeVisitAlpha = typeof config.changeVisitAlpha === 'undefined' ? true : config.changeVisitAlpha, removeOldVisits = typeof config.removeOldVisits === 'undefined' ? true : config.removeOldVisits, + doNotRefreshVisits = typeof config.doNotRefreshVisits === 'undefined' ? false : config.doNotRefreshVisits, width = main.width(), lastTimestamp = -1, lastVisits = [], @@ -331,6 +332,12 @@ * If firstRun is true, the SymbolGroup is initialized */ function refreshVisits(firstRun) { + if (lastTimestamp != -1 + && doNotRefreshVisits + ) { + return; + } + /* * this is called after new visit reports came in */ |