fix script
This commit is contained in:
parent
929c2dda4f
commit
0eb0bb0e7d
1 changed files with 9 additions and 5 deletions
|
|
@ -16,12 +16,16 @@ foreach (glob($directory . '/*/index.php') as $filePath) {
|
||||||
break;
|
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 {
|
} else {
|
||||||
echo "Fichier ignoré ou format inattendu : $filePath\n";
|
echo "Fichier ignoré ou format inattendu : $filePath\n";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue