Verified Commit bbb0513e authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(Exporter) - exporter classes to php 8.2

Adapt Exporters classses to php8.2
No related merge requests found
Showing with 5 additions and 5 deletions
+5 -5
...@@ -67,7 +67,7 @@ class pdfExporter ...@@ -67,7 +67,7 @@ class pdfExporter
$this->result = new PDF('L', 'mm', 'A4'); $this->result = new PDF('L', 'mm', 'A4');
$this->result->AliasNbPages(); $this->result->AliasNbPages();
$this->result->SetFont('Helvetica', '', 10); $this->result->SetFont('Helvetica', '', 10);
$this->result->setHeadline(utf8_decode($headline)); $this->result->setHeadline(mb_convert_encoding((string) $headline, 'ISO-8859-1'));
$this->result->AddPage(); $this->result->AddPage();
// Analyze for width // Analyze for width
...@@ -92,7 +92,7 @@ class pdfExporter ...@@ -92,7 +92,7 @@ class pdfExporter
foreach ($columns as $order => $index) { foreach ($columns as $order => $index) {
if (isset($header[$index])) { if (isset($header[$index])) {
$this->result->Cell($width[$order], 7, utf8_decode($header[$index]), 1, 0, 'C', 1); $this->result->Cell($width[$order], 7, mb_convert_encoding($header[$index], 'ISO-8859-1'), 1, 0, 'C', 1);
} else { } else {
$this->result->Cell($width[$order], 7, '', 1, 0, 'C', 1); $this->result->Cell($width[$order], 7, '', 1, 0, 'C', 1);
} }
...@@ -107,7 +107,7 @@ class pdfExporter ...@@ -107,7 +107,7 @@ class pdfExporter
foreach ($columns as $order => $index) { foreach ($columns as $order => $index) {
if (isset($row["_sort$index"])) { if (isset($row["_sort$index"])) {
$this->result->Cell($width[$order], 6, utf8_decode($row["_sort$index"]), 'LR', 0, 'L', $fill); $this->result->Cell($width[$order], 6, mb_convert_encoding($row["_sort$index"], 'ISO-8859-1'), 'LR', 0, 'L', $fill);
} else { } else {
$this->result->Cell($width[$order], 6, '', 'LR', 0, 'L', $fill); $this->result->Cell($width[$order], 6, '', 'LR', 0, 'L', $fill);
} }
...@@ -242,7 +242,7 @@ class pdfExporter ...@@ -242,7 +242,7 @@ class pdfExporter
$result->SetFont('Helvetica', '', 10); $result->SetFont('Helvetica', '', 10);
$headline = $listing->parent->headline; $headline = $listing->parent->headline;
$headline .= ', '._('created by').' '.$ui->cn.' - '.strftime('%A, %d. %B %Y, %H:%M:%S'); $headline .= ', '._('created by').' '.$ui->cn.' - '.strftime('%A, %d. %B %Y, %H:%M:%S');
$result->setHeadline(utf8_decode($headline)); $result->setHeadline(mb_convert_encoding($headline, 'ISO-8859-1'));
$result->AddPage(); $result->AddPage();
// Analyze for width // Analyze for width
...@@ -259,7 +259,7 @@ class pdfExporter ...@@ -259,7 +259,7 @@ class pdfExporter
foreach ($columns as $index => $column) { foreach ($columns as $index => $column) {
if ($column->isExportable()) { if ($column->isExportable()) {
$result->Cell($width[$index], 7, utf8_decode($column->getLabel()), 1, 0, 'C', 1); $result->Cell($width[$index], 7, mb_convert_encoding((string) $column->getLabel(), 'ISO-8859-1'), 1, 0, 'C', 1);
} }
} }
$result->Ln(); $result->Ln();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment