From 876937a84fa73457eb81468509bed551409e97a4 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 7 Oct 2004 12:21:19 +0000 Subject: [PATCH] Nettoyage du code --- htdocs/compta/facture/apercu.php | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 50a2bac8bf2..27ba50806cc 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -114,7 +114,7 @@ if ($_GET["facid"] > 0) } else { - print 'Classer la facture'; + print '-'; } print " "; } @@ -129,14 +129,10 @@ if ($_GET["facid"] > 0) * Documents * * - */ - - + */ $file = FAC_OUTPUTDIR . "/" . $fac->ref . "/" . $fac->ref . ".pdf"; $filedetail = FAC_OUTPUTDIR . "/" . $fac->ref . "/" . $fac->ref . "-detail.pdf"; - - if (file_exists($file)) { $encfile = urlencode($file); @@ -177,20 +173,19 @@ if ($_GET["facid"] > 0) $reason = imagick_failedreason( $handle ) ; $description = imagick_faileddescription( $handle ) ; - print "handle failed!
\nReason: $reason
\nDescription: $description
\n" ; - + print "handle failed!
\nReason: $reason
\nDescription: $description
\n"; } imagick_convert( $handle, "PNG" ) ; - /* - if ( !imagick_resize( $handle, 700, 700, IMAGICK_FILTER_UNKNOWN, 0, "200+200!" ) ) + + if ( imagick_iserror( $handle ) ) { - $reason = imagick_failedreason( $handle ) ; - $description = imagick_faileddescription( $handle ) ; - - print "imagick_resize() failed
\nReason: $reason
\nDescription: $description
\n" ; + $reason = imagick_failedreason( $handle ) ; + $description = imagick_faileddescription( $handle ) ; + + print "handle failed!
\nReason: $reason
\nDescription: $description
\n"; } - */ + imagick_writeimage( $handle, $file .".png"); }