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:
authormattpiwik <matthieu.aubry@gmail.com>2012-02-02 03:48:22 +0400
committermattpiwik <matthieu.aubry@gmail.com>2012-02-02 03:48:22 +0400
commit1f8620e210c7ee0abcabff0a693ab9a743da8f86 (patch)
tree6b85b90ac11cad179cfff7d381b001f9fe1d5aa7 /core/ReportRenderer/Pdf.php
parent4ecd45a09a68af4ab0754f7ab9e1ae54100cbd5a (diff)
Fixes bug in Pages URLs/ Page titles reports in PDF report looking not good since they were restricted to 2/3 of width Refs
git-svn-id: http://dev.piwik.org/svn/trunk@5738 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/ReportRenderer/Pdf.php')
-rw-r--r--core/ReportRenderer/Pdf.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/ReportRenderer/Pdf.php b/core/ReportRenderer/Pdf.php
index 3506420211..657e52199d 100644
--- a/core/ReportRenderer/Pdf.php
+++ b/core/ReportRenderer/Pdf.php
@@ -180,7 +180,7 @@ class Piwik_ReportRenderer_Pdf extends Piwik_ReportRenderer
// Table-only report with more than 2 columns
static $tableOnlyManyColumnReportRowCount = 0;
$tableOnlyManyColumnReport = $tableOnlyReport
- && $columnCount > 2;
+ && $columnCount > 3;
$reportHasData = $this->reportHasData();
@@ -409,8 +409,10 @@ class Piwik_ReportRenderer_Pdf extends Piwik_ReportRenderer
}
}
+ $columnsCount = count($this->reportColumns);
// Computes available column width
- if ($this->orientation == 'P') {
+ if ($this->orientation == 'P'
+ && $columnsCount <= 3) {
$totalWidth = $this->reportWidthPortrait * 2 / 3;
}
else if ($this->orientation == 'L') {
@@ -420,7 +422,6 @@ class Piwik_ReportRenderer_Pdf extends Piwik_ReportRenderer
{
$totalWidth = $this->reportWidthPortrait;
}
- $columnsCount = count($this->reportColumns);
$this->totalWidth = $totalWidth;
$this->labelCellWidth = max(round(($this->totalWidth / $columnsCount) ), $this->minWidthLabelCell);
$this->cellWidth = round(($this->totalWidth - $this->labelCellWidth) / ($columnsCount - 1));