Skip to content

Commit

Permalink
change fileName for script, and add baseName variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekiro-kost committed Dec 23, 2024
1 parent 431cd1e commit f4a87c9
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<?php


$scriptFileName = basename(__FILE__);


function replacePluginIdInFiles($directory, $newId) {
global $scriptFileName;
$oldId = 'template';
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory));

foreach ($files as $file) {
if ($file->isFile()) {

$fileName = $file->getFilename();
if ($fileName === 'configurationHelper.php') {
if ($fileName === $scriptFileName) {
continue;
}

Expand All @@ -29,6 +34,7 @@ function replacePluginIdInFiles($directory, $newId) {
}

function renameFiles($directory, $newId) {
global $scriptFileName;
$oldId = 'template';
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory));

Expand Down Expand Up @@ -142,6 +148,8 @@ function processDirectories($directories, $newId) {
break;
}

// echo "Vous avez choisir la catégorie '$categoryChoice'.\n";

echo "Votre plugin possede t-il un démon ? (oui/non) : ";
$demonResponse = trim(fgets(STDIN));

Expand Down

0 comments on commit f4a87c9

Please sign in to comment.