From 3d821cf8b521c714cd33a79f61d84decdb46b6ac Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 18 Dec 2005 13:43:33 +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 --- .../modules/facture/pdf_oursin.modules.php | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/htdocs/includes/modules/facture/pdf_oursin.modules.php b/htdocs/includes/modules/facture/pdf_oursin.modules.php index c09285d8a73..31ee67ffbe1 100644 --- a/htdocs/includes/modules/facture/pdf_oursin.modules.php +++ b/htdocs/includes/modules/facture/pdf_oursin.modules.php @@ -578,20 +578,22 @@ class pdf_oursin extends ModelePDFFactures $pdf->SetXY($this->marges['g'],6); // 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)) - { - $taille=getimagesize(FAC_PDF_LOGO); - $longueur=$taille[0]/2.835; - $pdf->Image(FAC_PDF_LOGO, $this->marges['g'], $this->marges['h'], 0, 24); - } - 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("ErrorGoToModuleSetup"), 0, 'L'); - } + if (is_readable($logo)) + { + $taille=getimagesize($logo); + $longueur=$taille[0]/2.835; + $pdf->Image($logo, $this->marges['g'], $this->marges['h'], 0, 24); + } + else + { + $pdf->SetTextColor(200,0,0); + $pdf->SetFont('Arial','B',8); + $pdf->MultiCell(80, 3, $langs->trans("ErrorLogoFileNotFound",$logo), 0, 'L'); + $pdf->MultiCell(80, 3, $langs->trans("ErrorGoToModuleSetup"), 0, 'L'); + } } else if (defined("FAC_PDF_INTITULE")) {