From e7d95b1210176726a4d94822b5d619826d416eb7 Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Sun, 5 Feb 2006 23:46:23 +0000 Subject: [PATCH] meme motif, meme punition pour le repertoire upload/ des logos --- ecrire/inc_logos.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ecrire/inc_logos.php b/ecrire/inc_logos.php index e7f3ba53dc..2036d2928c 100644 --- a/ecrire/inc_logos.php +++ b/ecrire/inc_logos.php @@ -118,14 +118,17 @@ function afficher_logo($racine, $titre, $logo, $redirect) { "' class='fondo' style='font-size:9px' /></div>"; $afficher = ""; if ($GLOBALS['flag_upload']) { - $myDir = opendir(_DIR_TRANSFERT); - while(($entryName = readdir($myDir)) !== false){ - if (!ereg("^\.",$entryName) AND eregi("(gif|jpg|png)$",$entryName)){ - $entryName = addslashes($entryName); - $afficher .= "\n<option value='$entryName'>$entryName</option>"; + if (@is_dir(_DIR_TRANSFERT) AND is_readable(_DIR_TRANSFERT)) { + $myDir = opendir(_DIR_TRANSFERT); + while(($entryName = readdir($myDir)) !== false){ + if (!ereg("^\.",$entryName) AND eregi("(gif|jpg|png)$",$entryName)){ + $entryName = addslashes($entryName); + $afficher .= "\n<option value='$entryName'>$entryName</option>"; + } } - } - closedir($myDir); + closedir($myDir); + } else + spip_log("repertoire "._DIR_TRANSFERT." absent ou illisible"); } if (!$afficher) { echo _T('info_installer_images_dossier', -- GitLab