aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2003-09-23 21:37:04 +0000
committerz0rglub <z0rglub@piwigo.org>2003-09-23 21:37:04 +0000
commit8f1394a7b7b9ab9745928c85f1037b21211f934d (patch)
tree5f06bb6046c2c4c9a541f8a85d37e95ee61e5cc9
parent1d7758f029c150046aae7da7e089bd1e4e813a76 (diff)
Filename must use the same characters as the directories
git-svn-id: http://piwigo.org/svn/trunk@161 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/create_listing_file.php10
1 files changed, 9 insertions, 1 deletions
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>$url</url>";
+$listing.= '<url>'.$url.'</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 '<span style="color:red;">"'.$file.'" : ';
+ echo 'The name of the picture should be composed of ';
+ echo 'letters, figures, "-", "_" or "." ONLY';
+ echo '</span><br />';
+ }
}
}
}