Index: /trunk/admin/update.php
===================================================================
--- /trunk/admin/update.php	(revision 159)
+++ /trunk/admin/update.php	(revision 160)
@@ -220,33 +220,42 @@
             if ( mysql_num_rows( $result ) == 0 )
             {
-              $picture = array();
-              $picture['file']     = $file;
-              $picture['tn_ext']   = $tn_ext;
-              $picture['date'] = date( 'Y-m-d', filemtime ( $rep.'/'.$file ) );
-              $picture['filesize'] = floor( filesize( $rep.'/'.$file ) / 1024);
-              $image_size = @getimagesize( $rep.'/'.$file );
-              $picture['width']    = $image_size[0];
-              $picture['height']   = $image_size[1];
-              if ( $waiting['validated'] == 'true' )
+              // the name of the file must not use acentuated characters or
+              // blank space..
+              if ( preg_match( '/^[a-zA-Z0-9-_.]+$/', $file ) )
               {
-                // retrieving infos from the XML description of
-                // $waiting['infos']
-                $infos = nl2br( $waiting['infos'] );
-                $picture['author']        = getAttribute( $infos, 'author' );
-                $picture['comment']       = getAttribute( $infos, 'comment' );
-                $unixtime = getAttribute( $infos, 'date_creation' );
-                $picture['date_creation'] = '';
-                if ( $unixtime != '' )
+                $picture = array();
+                $picture['file']     = $file;
+                $picture['tn_ext']   = $tn_ext;
+                $picture['date'] = date( 'Y-m-d', filemtime($rep.'/'.$file) );
+                $picture['filesize'] = floor( filesize($rep.'/'.$file) / 1024);
+                $image_size = @getimagesize( $rep.'/'.$file );
+                $picture['width']    = $image_size[0];
+                $picture['height']   = $image_size[1];
+                if ( $waiting['validated'] == 'true' )
                 {
-                  $picture['date_creation'] = date( 'Y-m-d', $unixtime );
+                  // retrieving infos from the XML description of
+                  // $waiting['infos']
+                  $infos = nl2br( $waiting['infos'] );
+                  $picture['author']        = getAttribute( $infos, 'author' );
+                  $picture['comment']       = getAttribute( $infos, 'comment');
+                  $unixtime = getAttribute( $infos, 'date_creation' );
+                  $picture['date_creation'] = '';
+                  if ( $unixtime != '' )
+                    $picture['date_creation'] = date( 'Y-m-d', $unixtime );
+                  $picture['name']          = getAttribute( $infos, 'name' );
+                  // deleting the waiting element
+                  $query = 'DELETE FROM '.PREFIX_TABLE.'waiting';
+                  $query.= ' WHERE id = '.$waiting['id'];
+                  $query.= ';';
+                  mysql_query( $query );
                 }
-                $picture['name']          = getAttribute( $infos, 'name' );
-                // deleting the waiting element
-                $query = 'DELETE FROM '.PREFIX_TABLE.'waiting';
-                $query.= ' WHERE id = '.$waiting['id'];
-                $query.= ';';
-                mysql_query( $query );
+                array_push( $pictures, $picture );
               }
-              array_push( $pictures, $picture );
+              else
+              {
+                $output.= '<span style="color:red;">"'.$file.'" : ';
+                $output.= $lang['update_wrong_dirname'].'</span><br />';
+              }
+
             }
           }
Index: /trunk/language/english.php
===================================================================
--- /trunk/language/english.php	(revision 159)
+++ /trunk/language/english.php	(revision 160)
@@ -559,5 +559,5 @@
   $lang['infoimage_removefromall'] = 'remove from all';
   $lang['infoimage_associate'] = 'Associate to the category';
-  $lang['update_wrong_dirname'] = 'The name of the directory must be composed of letters, figures, "-", "_" or "."';
+  $lang['update_wrong_dirname'] = 'The name of directories and files must be composed of letters, figures, "-", "_" or "."';
   $lang['stats_last_days'] = 'last days';
   $lang['stats_pages_seen'] = 'pages seen';
Index: /trunk/language/francais.php
===================================================================
--- /trunk/language/francais.php	(revision 159)
+++ /trunk/language/francais.php	(revision 160)
@@ -562,5 +562,5 @@
   $lang['update_all'] = 'mettre tout à jour';
 // start version 1.3
-  $lang['update_wrong_dirname'] = 'le nom du répertoire ne doit être composé que de lettres, de chiffres et "-", "_" ou ".".';
+  $lang['update_wrong_dirname'] = 'le nom des fichiers et répertoires ne doivent être composé que de lettres, de chiffres et "-", "_" ou ".".';
 // end version 1.3
 		
