diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-05-14 03:15:04 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-05-14 03:15:04 +0400 |
commit | 10deaac891671722771ab050e147094e7eacee85 (patch) | |
tree | 0e9853ca45ba25db3426a4e5277a4a0e340f51c4 | |
parent | b737e9ef42f7833c71ea536318df8edbbfe559da (diff) |
Refs #2135
Fixing couple small bugs
-rw-r--r-- | plugins/SegmentEditor/templates/Segmentation.js | 3 | ||||
-rw-r--r-- | plugins/UserCountryMap/Controller.php | 24 |
2 files changed, 16 insertions, 11 deletions
diff --git a/plugins/SegmentEditor/templates/Segmentation.js b/plugins/SegmentEditor/templates/Segmentation.js index 0b5ab93147..89f93edf4a 100644 --- a/plugins/SegmentEditor/templates/Segmentation.js +++ b/plugins/SegmentEditor/templates/Segmentation.js @@ -49,6 +49,9 @@ Segmentation = (function($) { } var setSegment = function(segmentStr){ + if(!$.browser.mozilla) { + segmentStr = encodeURIComponent(segmentStr); + } self.currentSegmentStr = segmentStr; } diff --git a/plugins/UserCountryMap/Controller.php b/plugins/UserCountryMap/Controller.php index 5195ec7421..611bd71ef0 100644 --- a/plugins/UserCountryMap/Controller.php +++ b/plugins/UserCountryMap/Controller.php @@ -67,17 +67,19 @@ class Piwik_UserCountryMap_Controller extends Piwik_Controller )); // template for ajax requests - $view->reqParamsJSON = Piwik_Common::json_encode(array( - 'period' => $period, - 'idSite' => $idSite, - 'date' => $date, - 'token_auth' => $token_auth, - 'format' => 'json', - 'segment' => Piwik_ViewDataTable::getRawSegmentFromRequest(), - 'showRawMetrics' => 1, - 'enable_filter_excludelowpop' => 1, - 'filter_excludelowpop_value' => -1 - )); + $params = array( + 'period' => $period, + 'idSite' => $idSite, + 'date' => $date, + 'token_auth' => $token_auth, + 'format' => 'json', + 'segment' => Piwik_ViewDataTable::getRawSegmentFromRequest(), + 'showRawMetrics' => 1, + 'enable_filter_excludelowpop' => 1, + 'filter_excludelowpop_value' => -1 + ); + $params = array_filter($params); + $view->reqParamsJSON = Piwik_Common::json_encode($params); $view->metrics = $config['metrics'] = $this->getMetrics($idSite, $period, $date, $token_auth); $config['svgBasePath'] = 'plugins/UserCountryMap/svg/'; $config['mapCssPath'] = 'plugins/UserCountryMap/css/map.css'; |