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/ReportRenderer.php')
-rw-r--r--core/ReportRenderer.php25
1 files changed, 13 insertions, 12 deletions
diff --git a/core/ReportRenderer.php b/core/ReportRenderer.php
index 0c0bc73243..1fd251dcb2 100644
--- a/core/ReportRenderer.php
+++ b/core/ReportRenderer.php
@@ -103,9 +103,10 @@ abstract class Piwik_ReportRenderer
* @param string $reportTitle
* @param string $prettyDate formatted date
* @param string $description
- * @param array $reportMetadata metadata for all reports
+ * @param array $reportMetadata metadata for all reports
+ * @param array $segment segment applied to all reports
*/
- abstract public function renderFrontPage($reportTitle, $prettyDate, $description, $reportMetadata);
+ abstract public function renderFrontPage($reportTitle, $prettyDate, $description, $reportMetadata, $segment);
/**
* Render the provided report.
@@ -215,23 +216,23 @@ abstract class Piwik_ReportRenderer
);
}
- public static function getStaticGraph($reportMetadata, $width, $height, $evolution)
+ public static function getStaticGraph($reportMetadata, $width, $height, $evolution, $segment)
{
-
$imageGraphUrl = $reportMetadata['imageGraphUrl'];
if ($evolution && !empty($reportMetadata['imageGraphEvolutionUrl'])) {
$imageGraphUrl = $reportMetadata['imageGraphEvolutionUrl'];
}
- $request = new Piwik_API_Request(
- $imageGraphUrl .
- '&outputType=' . Piwik_ImageGraph_API::GRAPH_OUTPUT_PHP .
- '&format=original&serialize=0' .
- '&filter_truncate=' .
- '&width=' . $width .
- '&height=' . $height
- );
+ $requestGraph = $imageGraphUrl .
+ '&outputType=' . Piwik_ImageGraph_API::GRAPH_OUTPUT_PHP .
+ '&format=original&serialize=0' .
+ '&filter_truncate=' .
+ '&width=' . $width .
+ '&height=' . $height .
+ ($segment != null ? '&segment=' . urlencode($segment['definition']) : '');
+
+ $request = new Piwik_API_Request($requestGraph);
try {
$imageGraph = $request->process();