fix development mode document type

# Conflicts:
#	Application/Model/AbstractClasses/pdfdocumentsGeneric.php
#	Application/views/de/translations.php
#	Application/views/en/translations.php
This commit is contained in:
2025-05-17 22:23:35 +02:00
parent 31a5674490
commit c1ad0a1665
3 changed files with 8 additions and 8 deletions

View File

@ -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');

View File

@ -23,10 +23,10 @@ $basicAuthHelp = <<<HELP
return [
'charset' => '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)',

View File

@ -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)',