From 104096f4f49a952e8fe158961680a9a63136b746 Mon Sep 17 00:00:00 2001 From: azett Date: Fri, 24 Jun 2022 21:50:57 +0200 Subject: [PATCH] Call fs_is_directorycomponent() and fs_is_hidden_file() instead of checking manually --- fp-includes/core/core.gallery.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fp-includes/core/core.gallery.php b/fp-includes/core/core.gallery.php index 017caf7..b7dc21d 100644 --- a/fp-includes/core/core.gallery.php +++ b/fp-includes/core/core.gallery.php @@ -35,11 +35,7 @@ function gallery_fetch_galleries() { $dir = opendir(ABS_PATH . IMAGES_DIR); while (false !== ($file = readdir($dir))) { $fullpath = ABS_PATH . IMAGES_DIR . $file; - if (!in_array($file, array( - ".", - "..", - ".thumbs" - )) && is_dir($fullpath)) { + if (!fs_is_directorycomponent($file) && !fs_is_hidden_file($file) && is_dir($fullpath)) { $galleries [] = $file; } }