fix script

This commit is contained in:
isUnknown 2025-01-20 14:47:02 +01:00
parent 929c2dda4f
commit 0eb0bb0e7d

View file

@ -16,12 +16,16 @@ foreach (glob($directory . '/*/index.php') as $filePath) {
break;
}
$data['role'] = $newRoleValue;
if ($newRoleValue) {
$data['role'] = $newRoleValue;
$exportedData = "<?php\n\nreturn " . var_export($data, true) . ";\n";
file_put_contents($filePath, $exportedData);
echo "Fichier modifié : $filePath\n";
} else {
echo "Fichier ignoré ou format inattendu : $filePath\n";
}
$exportedData = "<?php\n\nreturn " . var_export($data, true) . ";\n";
file_put_contents($filePath, $exportedData);
echo "Fichier modifié : $filePath\n";
} else {
echo "Fichier ignoré ou format inattendu : $filePath\n";
}