Skip to content

Commit

Permalink
Merge pull request #215 from Tsheke/EXPORT_MLANG
Browse files Browse the repository at this point in the history
Export multilanguage support
  • Loading branch information
jleyva authored Oct 3, 2024
2 parents 09ccd7f + d7b4cf9 commit 1ada1cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions export/csv/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ function export_report($report) {

if (!empty($table->head)) {
foreach ($table->head as $key => $heading) {
$matrix[0][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br($heading))));
$matrix[0][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br(format_string($heading)))));
}
}

if (!empty($table->data)) {
foreach ($table->data as $rkey => $row) {
foreach ($row as $key => $item) {
$matrix[$rkey + 1][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br($item))));
$matrix[$rkey + 1][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br(format_string($item)))));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion export/json/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function export_report($report) {
foreach ($table->data as $data) {
$jsonobject = [];
foreach ($data as $index => $value) {
$jsonobject[$headers[$index]] = $value;
$jsonobject[$headers[$index]] = format_string($value);
}
$json[] = $jsonobject;
}
Expand Down
4 changes: 2 additions & 2 deletions export/ods/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ function export_report($report) {

if (!empty($table->head)) {
foreach ($table->head as $key => $heading) {
$matrix[0][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br($heading))));
$matrix[0][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br(format_string($heading)))));
}
}

if (!empty($table->data)) {
foreach ($table->data as $rkey => $row) {
foreach ($row as $key => $item) {
$matrix[$rkey + 1][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br($item))));
$matrix[$rkey + 1][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br(format_string($item)))));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions export/xls/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ function export_report($report) {

if (!empty($table->head)) {
foreach ($table->head as $key => $heading) {
$matrix[0][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br($heading))));
$matrix[0][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br(format_string($heading)))));
}
}

if (!empty($table->data)) {
foreach ($table->data as $rkey => $row) {
foreach ($row as $key => $item) {
$matrix[$rkey + 1][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br($item))));
$matrix[$rkey + 1][$key] = str_replace("\n", ' ', htmlspecialchars_decode(strip_tags(nl2br(format_string($item)))));
}
}
}
Expand Down

0 comments on commit 1ada1cb

Please sign in to comment.