From eda800d04862b996a86172e1b5801178df730943 Mon Sep 17 00:00:00 2001 From: Ruben Date: Sat, 1 Nov 2025 20:15:37 +0100 Subject: [PATCH] Skip system files when finding content files --- app/router.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/router.php b/app/router.php index 92b0148..ef2f2ed 100644 --- a/app/router.php +++ b/app/router.php @@ -60,6 +60,9 @@ function findAllContentFiles(string $dir, string $lang, string $defaultLang): ar foreach ($files as $file) { if ($file === '.' || $file === '..') continue; + // Exclude system files from content + if ($file === 'index.php') continue; + $ext = pathinfo($file, PATHINFO_EXTENSION); if (!in_array($ext, $extensions)) continue;