From c1ad0a1665a58bf0a14516f080e9bee04e946b51 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Sat, 17 May 2025 22:23:35 +0200 Subject: [PATCH] fix development mode document type # Conflicts: # Application/Model/AbstractClasses/pdfdocumentsGeneric.php # Application/views/de/translations.php # Application/views/en/translations.php --- Application/Model/AbstractClasses/pdfdocumentsGeneric.php | 4 ++-- Application/views/de/translations.php | 8 ++++---- Application/views/en/translations.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php index 1872f2d..fb48ce2 100644 --- a/Application/Model/AbstractClasses/pdfdocumentsGeneric.php +++ b/Application/Model/AbstractClasses/pdfdocumentsGeneric.php @@ -366,7 +366,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface */ public function outputDev(Html2Pdf $pdf, string $filename, string $target, string $html): ?string { - $filename = str_replace('.pdf', '.html', $filename); + $filename = str_replace('.pdf', '.sgml', $filename); switch ($target) { case 'I': { @@ -407,7 +407,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface header('Content-Type: application/force-download'); header('Content-Type: application/octet-stream', false); header('Content-Type: application/download', false); - header('Content-Type: text/html', false); + header('Content-Type: text/sgml', false); // use the Content-Disposition header to supply a recommended filename header('Content-Disposition: attachment; filename="'.basename($filename).'";'); header('Content-Transfer-Encoding: binary'); diff --git a/Application/views/de/translations.php b/Application/views/de/translations.php index 88339f3..406cabd 100644 --- a/Application/views/de/translations.php +++ b/Application/views/de/translations.php @@ -23,10 +23,10 @@ $basicAuthHelp = << 'utf-8', - 'SHOP_MODULE_GROUP_'. Constants::OXID_MODULE_ID.'main' => 'Grundeinstellungen', - 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Entwicklermodus', - 'HELP_SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Mit aktiviertem Entwicklermodus wird das Dokument im '. - 'HTML-Format ausgegeben. Inhaltliche Fehler können so besser nachvollzogen werden.', + 'SHOP_MODULE_GROUP_'. Constants::OXID_MODULE_ID.'main' => 'Grundeinstellungen', + 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Entwicklermodus', + 'HELP_SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Mit aktiviertem Entwicklermodus kann das Dokument im '. + 'SGML-Format ausgegeben werden. Inhaltliche Fehler können so besser nachvollzogen werden.', 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'basicAuthUserName' => 'BasicAuth des Shops - Benutzername (optional)', 'HELP_SHOP_MODULE_'. Constants::OXID_MODULE_ID.'basicAuthUserName' => $basicAuthHelp, 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'basicAuthPassword' => 'BasicAuth des Shops - Passwort (optional)', diff --git a/Application/views/en/translations.php b/Application/views/en/translations.php index 84bce8b..392ca3a 100644 --- a/Application/views/en/translations.php +++ b/Application/views/en/translations.php @@ -25,8 +25,8 @@ return [ 'SHOP_MODULE_GROUP_'. Constants::OXID_MODULE_ID.'main' => 'Basic settings', 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'Developer mode', - 'HELP_SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'If developer mode is activated, the document is output in '. - 'HTML format. This makes it much easier to trace content errors.', + 'HELP_SHOP_MODULE_'. Constants::OXID_MODULE_ID.'bDev' => 'If developer mode is activated, the document can exported '. + 'in SGML format. This makes it much easier to trace content errors.', 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'basicAuthUserName' => 'BasicAuth of the shop - user name (optional)', 'HELP_SHOP_MODULE_'. Constants::OXID_MODULE_ID.'basicAuthUserName' => $basicAuthHelp, 'SHOP_MODULE_'. Constants::OXID_MODULE_ID.'basicAuthPassword' => 'BasicAuth of the shop - password (optional)',