Skip to content

Commit

Permalink
Fix modulebuilder MAIN_ODT_AS_PDF (Dolibarr#30496)
Browse files Browse the repository at this point in the history
  • Loading branch information
fappels authored Jul 31, 2024
1 parent 966ac2c commit dc58a90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails
$reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks

// Write new file
if (getDolGlobalInt('MAIN_ODT_AS_PDF')) {
if (getDolGlobalString('MAIN_ODT_AS_PDF')) {
try {
$odfHandler->exportAsAttachedPDF($file);
} catch (Exception $e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$title = $outputlangs->transnoentities("PdfTitle");
if (getDolGlobalInt('MAIN_ODT_AS_PDF') && is_object($outputlangsbis)) {
if (getDolGlobalString('MAIN_ODT_AS_PDF') && is_object($outputlangsbis)) {
$title .= ' - ';
$title .= $outputlangsbis->transnoentities("PdfTitle");
}
Expand Down

0 comments on commit dc58a90

Please sign in to comment.