diff options
author | JulienMoumne <julien@piwik.org> | 2011-11-08 23:14:16 +0400 |
---|---|---|
committer | JulienMoumne <julien@piwik.org> | 2011-11-08 23:14:16 +0400 |
commit | ebe02f8a4fa0197a63490b27bdcf5218360a3d84 (patch) | |
tree | 563d2c5a99b121e340cb3bc681eb28959f2ffcbe /core/ReportRenderer/Html.php | |
parent | 426ad3f04e5f7b6e0e9d56331b9502afa2037341 (diff) |
fixes #2706
* refs #2318, #71 : Graphs now supported
* refs #2670, #898 : Restoring VisitsSummary report metadata before eCommerce
* refs #1721 : Additional security, filename fixes and new internal outputType
git-svn-id: http://dev.piwik.org/svn/trunk@5415 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/ReportRenderer/Html.php')
-rw-r--r-- | core/ReportRenderer/Html.php | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/core/ReportRenderer/Html.php b/core/ReportRenderer/Html.php index 6c44e98ae1..42b70ade91 100644 --- a/core/ReportRenderer/Html.php +++ b/core/ReportRenderer/Html.php @@ -103,16 +103,33 @@ class Piwik_ReportRenderer_Html extends Piwik_ReportRenderer $this->assignCommonParameters($smarty); $reportMetadata = $processedReport['metadata']; - $smarty->assign("reportName", $reportMetadata['name']); - $smarty->assign("reportId", $reportMetadata['uniqueId']); - $reportData = $processedReport['reportData']; $columns = $processedReport['columns']; list($reportData, $columns) = self::processTableFormat($reportMetadata, $reportData, $columns); + $smarty->assign("reportName", $reportMetadata['name']); + $smarty->assign("reportId", $reportMetadata['uniqueId']); $smarty->assign("reportColumns", $columns); $smarty->assign("reportRows", $reportData->getRows()); $smarty->assign("reportRowsMetadata", $processedReport['reportMetadata']->getRows()); + $smarty->assign("displayTable", $processedReport['displayTable']); + + $displayGraph = $processedReport['displayGraph']; + $smarty->assign("displayGraph", $displayGraph); + + if($displayGraph) + { + $smarty->assign("graphWidth", Piwik_ReportRenderer::IMAGE_GRAPH_WIDTH); + $smarty->assign("graphHeight", Piwik_ReportRenderer::IMAGE_GRAPH_HEIGHT); + $smarty->assign("renderImageInline", $this->renderImageInline); + + if($this->renderImageInline) + { + $generatedImageGraph = $processedReport['generatedImageGraph']; + $smarty->assign("generatedImageGraph", base64_encode($generatedImageGraph)); + unset($generatedImageGraph); + } + } $this->rendering .= $smarty->fetch(self::prefixTemplatePath("html_report_body.tpl")); } |