From 5c7f267455fc1b6711b03d8b30082d8615f1793e Mon Sep 17 00:00:00 2001 From: patdenice Date: Thu, 17 Nov 2011 14:39:47 +0000 Subject: bug:2511 Warning messages during thumbnails creation (FTP method) git-svn-id: http://piwigo.org/svn/trunk@12640 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/admin/include/functions.php b/admin/include/functions.php index 3491e0c4e..77e419d5b 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -858,6 +858,8 @@ function get_fs($path, $recursive = true) { while (($node = readdir($contents)) !== false) { + if ($node == '.' or $node == '..') continue; + if (is_file($path.'/'.$node)) { $extension = get_extension($node); @@ -884,11 +886,7 @@ function get_fs($path, $recursive = true) array_push($fs['elements'], $path.'/'.$node); } } - else if (is_dir($path.'/'.$node) - and $node != '.' - and $node != '..' - and $node != 'pwg_high' - and $recursive) + else if (is_dir($path.'/'.$node) and $node != 'pwg_high' and $recursive) { array_push($subdirs, $node); } -- cgit v1.2.3