Skip system files when finding content files

This commit is contained in:
Ruben 2025-11-01 20:15:37 +01:00
parent b507a0c676
commit eda800d048

View file

@ -60,6 +60,9 @@ function findAllContentFiles(string $dir, string $lang, string $defaultLang): ar
foreach ($files as $file) { foreach ($files as $file) {
if ($file === '.' || $file === '..') continue; if ($file === '.' || $file === '..') continue;
// Exclude system files from content
if ($file === 'index.php') continue;
$ext = pathinfo($file, PATHINFO_EXTENSION); $ext = pathinfo($file, PATHINFO_EXTENSION);
if (!in_array($ext, $extensions)) continue; if (!in_array($ext, $extensions)) continue;