From 8f1394a7b7b9ab9745928c85f1037b21211f934d Mon Sep 17 00:00:00 2001 From: z0rglub Date: Tue, 23 Sep 2003 21:37:04 +0000 Subject: Filename must use the same characters as the directories git-svn-id: http://piwigo.org/svn/trunk@161 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/create_listing_file.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'admin/create_listing_file.php') diff --git a/admin/create_listing_file.php b/admin/create_listing_file.php index f6e2581a4..507a4862f 100644 --- a/admin/create_listing_file.php +++ b/admin/create_listing_file.php @@ -19,7 +19,7 @@ $end = strrpos( $_SERVER['PHP_SELF'], '/' ) + 1; $local_folder = substr( $_SERVER['PHP_SELF'], 0, $end ); $url = 'http://'.$_SERVER['HTTP_HOST'].$local_folder; -$listing.= "$url"; +$listing.= ''.$url.''; // get_dirs retourne un tableau contenant tous les sous-répertoires d'un // répertoire @@ -138,6 +138,14 @@ function get_pictures( $rep, $indent ) $picture['height'] = $image_size[1]; array_push( $pictures, $picture ); + + if ( !preg_match( '/^[a-zA-Z0-9-_.]+$/', $file ) ) + { + echo '"'.$file.'" : '; + echo 'The name of the picture should be composed of '; + echo 'letters, figures, "-", "_" or "." ONLY'; + echo '
'; + } } } } -- cgit v1.2.3