From cf448796e76a2f3f683b1ab8da4bdd7abe7edf84 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 18 Dec 2005 13:26:00 +0000 Subject: [PATCH] =?UTF-8?q?Modification=20du=20chemin=20du=20logo=20afin?= =?UTF-8?q?=20de=20ne=20plus=20mettre=20le=20chemin=20complet=20dans=20la?= =?UTF-8?q?=20constante=20=20FAC=5FPDF=5FLOGO,=20cette=20constante=20devra?= =?UTF-8?q?=20contenir=20dor=E9navent=20ceci=20:=20"/logo/mylogo.png"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/includes/modules/facture/pdf_huitre.modules.php | 10 ++++++---- .../modules/propale/pdf_propale_orange.modules.php | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/htdocs/includes/modules/facture/pdf_huitre.modules.php b/htdocs/includes/modules/facture/pdf_huitre.modules.php index a4f8b98280f..3435c8cb53c 100644 --- a/htdocs/includes/modules/facture/pdf_huitre.modules.php +++ b/htdocs/includes/modules/facture/pdf_huitre.modules.php @@ -431,16 +431,18 @@ class pdf_huitre extends ModelePDFFactures { $ligne = 2; // Logo - if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO) + if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO) $logo=DOL_DATA_ROOT.FAC_PDF_LOGO; + if ($logo) { - if (file_exists(FAC_PDF_LOGO)) { + if (is_readable($logo)) + { $pdf->SetXY(10,5); - $pdf->Image(FAC_PDF_LOGO, 10, 5,45.0, 25.0); + $pdf->Image($logo, 10, 5,45.0, 25.0); } else { $pdf->SetTextColor(200,0,0); $pdf->SetFont('Arial','B',8); - $pdf->MultiCell(80, 3, $langs->trans("ErrorLogoFileNotFound",FAC_PDF_LOGO), 0, 'L'); + $pdf->MultiCell(80, 3, $langs->trans("ErrorLogoFileNotFound",$logo), 0, 'L'); $pdf->MultiCell(80, 3, $langs->trans("ErrorGoToModuleSetup"), 0, 'L'); } } diff --git a/htdocs/includes/modules/propale/pdf_propale_orange.modules.php b/htdocs/includes/modules/propale/pdf_propale_orange.modules.php index 18b41fa3e09..f2b6037e36e 100644 --- a/htdocs/includes/modules/propale/pdf_propale_orange.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_orange.modules.php @@ -295,16 +295,18 @@ class pdf_propale_orange extends ModelePDFPropales $tab4_sl = 4; $ligne = 2; - if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO) + if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO) $logo=DOL_DATA_ROOT.FAC_PDF_LOGO; + if ($logo) { $pdf->SetXY(10,5); - if (file_exists(FAC_PDF_LOGO)) { - $pdf->Image(FAC_PDF_LOGO, 10, 5,45.0, 25.0, 'PNG'); + if (is_readable($logo)) + { + $pdf->Image($logo, 10, 5,45.0, 25.0, 'PNG'); } else { $pdf->SetTextColor(200,0,0); $pdf->SetFont('Arial','B',8); - $pdf->MultiCell(80, 3, $langs->trans("ErrorLogoFileNotFound",FAC_PDF_LOGO), 0, 'L'); + $pdf->MultiCell(80, 3, $langs->trans("ErrorLogoFileNotFound",$logo), 0, 'L'); $pdf->MultiCell(80, 3, $langs->trans("ErrorGoToModuleSetup"), 0, 'L'); } }