Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/ViewDataTable/GenerateGraphHTML.php')
-rw-r--r--core/ViewDataTable/GenerateGraphHTML.php26
1 files changed, 19 insertions, 7 deletions
diff --git a/core/ViewDataTable/GenerateGraphHTML.php b/core/ViewDataTable/GenerateGraphHTML.php
index 1c3bad57f3..be7e774a0a 100644
--- a/core/ViewDataTable/GenerateGraphHTML.php
+++ b/core/ViewDataTable/GenerateGraphHTML.php
@@ -28,12 +28,13 @@ abstract class Piwik_ViewDataTable_GenerateGraphHTML extends Piwik_ViewDataTable
*/
function init($currentControllerName,
$currentControllerAction,
- $apiMethodToRequestDataTable )
+ $apiMethodToRequestDataTable,
+ $controllerActionCalledWhenRequestSubTable = null)
{
parent::init($currentControllerName,
$currentControllerAction,
- $apiMethodToRequestDataTable );
-
+ $apiMethodToRequestDataTable,
+ $controllerActionCalledWhenRequestSubTable);
$this->dataTableTemplate = 'CoreHome/templates/graph.tpl';
$this->disableOffsetInformation();
@@ -67,7 +68,8 @@ abstract class Piwik_ViewDataTable_GenerateGraphHTML extends Piwik_ViewDataTable
/**
* We persist the parametersToModify values in the javascript footer.
- * This is used by the "export links" that use the "date" attribute from the json properties array in the datatable footer.
+ * This is used by the "export links" that use the "date" attribute
+ * from the json properties array in the datatable footer.
*/
protected function getJavascriptVariablesToSet()
{
@@ -125,9 +127,19 @@ abstract class Piwik_ViewDataTable_GenerateGraphHTML extends Piwik_ViewDataTable
foreach($this->parametersToModify as $key => $val)
{
- if (is_array($val)) {
+ // We do not forward filter data to the graph controller.
+ // This would cause the graph to have filter_limit=5 set by default,
+ // which would break them (graphs need the full dataset to build the "Others" aggregate value)
+ if(strpos($key, 'filter_') !== false)
+ {
+ continue;
+ }
+ if (is_array($val))
+ {
$_GET[$key] = unserialize(serialize($val));
- } else {
+ }
+ else
+ {
$_GET[$key] = $val;
}
}
@@ -135,7 +147,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphHTML extends Piwik_ViewDataTable
$_GET = $saveGet;
- return str_replace(array("\r", "\n", "'"), array('', '', "\\'"), $content);
+ return str_replace(array("\r", "\n", "'", '\"'), array('', '', "\\'", '\\\"'), $content);
}
protected function getFlashParameters()