From 428a8773619d34a787fc5f6d6e95d96ac6f034e4 Mon Sep 17 00:00:00 2001 From: Esenjin Date: Tue, 31 Dec 2024 00:20:47 +0100 Subject: [PATCH] exclu les images matures du carrousel de l'accueil --- index.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index c2c4d82..cb4c29f 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,16 @@ isFile()) { $extension = strtolower($file->getExtension()); if (in_array($extension, ['jpg', 'jpeg', 'png', 'gif'])) { - $images[] = str_replace('\\', '/', $file->getPathname()); + // Vérifier si l'image provient d'un dossier mature + if (!isMatureContent($file->getPathname())) { + $images[] = str_replace('\\', '/', $file->getPathname()); + } } } }