Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 53844ace9a | |||
| f8022279ad |
+11
-1
@@ -374,6 +374,16 @@ class DirectAccessReportGenerator
|
|||||||
}
|
}
|
||||||
|
|
||||||
$processor->saveAs($outputPath);
|
$processor->saveAs($outputPath);
|
||||||
|
|
||||||
|
// Fix space preservation: PHPWord strips whitespace from <w:t> elements
|
||||||
|
// that lack xml:space="preserve", causing words to stick together in RTL docs.
|
||||||
|
$zip = new \ZipArchive();
|
||||||
|
if ($zip->open($outputPath) === true) {
|
||||||
|
$xml = $zip->getFromName('word/document.xml');
|
||||||
|
$xml = preg_replace('/<w:t(?![^>]*xml:space)/', '<w:t xml:space="preserve"', $xml);
|
||||||
|
$zip->addFromString('word/document.xml', $xml);
|
||||||
|
$zip->close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function normalizeDate(?string $value): ?string
|
private function normalizeDate(?string $value): ?string
|
||||||
@@ -392,7 +402,7 @@ class DirectAccessReportGenerator
|
|||||||
{
|
{
|
||||||
if (!$date) return '';
|
if (!$date) return '';
|
||||||
if (preg_match('/^(\d{4})-(\d{2})-(\d{2})$/', $date, $m)) {
|
if (preg_match('/^(\d{4})-(\d{2})-(\d{2})$/', $date, $m)) {
|
||||||
return "{$m[3]}/{$m[2]}/{$m[1]}";
|
return "{$m[3]}.{$m[2]}.{$m[1]}";
|
||||||
}
|
}
|
||||||
return $date;
|
return $date;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "LegalAssistance",
|
"name": "LegalAssistance",
|
||||||
"version": "2.0.6",
|
"version": "2.0.8",
|
||||||
"acceptableVersions": [">=8.0.0"],
|
"acceptableVersions": [">=8.0.0"],
|
||||||
"php": [">=8.1"],
|
"php": [">=8.1"],
|
||||||
"releaseDate": "2026-04-09",
|
"releaseDate": "2026-04-09",
|
||||||
|
|||||||
Reference in New Issue
Block a user