From b33a50e6ee41ba2e423202a18bb4f49f82a73fb3 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 11 Mar 2005 08:22:27 +0000 Subject: [PATCH] Bugfix sur l'affichage des photos --- htdocs/product.class.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 06ac538cccd..4203c23f693 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -891,19 +891,22 @@ class Product $pdir = get_exdir($this->id) . $this->id ."/photos/"; $dir = $sdir . '/'. $pdir; - $handle=opendir($dir); - - while (($file = readdir($handle))!==false) + if ( file_exists($dir)) { - if (is_file($dir.$file)) + $handle=opendir($dir); + + while (($file = readdir($handle))!==false) { - $photo = $file; + if (is_file($dir.$file)) + { + $photo = $file; + } + } + + if (strlen($photo)) + { + print ''; } - } - - if (strlen($photo)) - { - print ''; } } /**