diff --git a/arbre.php b/arbre.php index 752cb96..217b57e 100644 --- a/arbre.php +++ b/arbre.php @@ -19,8 +19,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($path && $newName) { $newPath = $path . '/' . sanitizeFilename($newName); if (!file_exists($newPath)) { + $moreInfoUrl = $_POST['more_info_url'] ?? ''; mkdir($newPath, 0755, true); - $infoContent = $newName . "\n" . $description . "\n" . $matureContent; + $infoContent = $newName . "\n" . $description . "\n" . $matureContent . "\n" . $moreInfoUrl; file_put_contents($newPath . '/infos.txt', $infoContent); $_SESSION['success_message'] = "Dossier créé avec succès."; } else { @@ -28,10 +29,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } } break; - + case 'edit_folder': if ($path && isSecurePath($path)) { - $infoContent = $newName . "\n" . $description . "\n" . $matureContent; + $moreInfoUrl = $_POST['more_info_url'] ?? ''; + $infoContent = $newName . "\n" . $description . "\n" . $matureContent . "\n" . $moreInfoUrl; $infoPath = $path . '/infos.txt'; if (file_put_contents($infoPath, $infoContent) !== false) { $_SESSION['success_message'] = "Dossier modifié avec succès."; @@ -104,7 +106,7 @@ function generateTree($path, $currentPath) { } $output .= ''; $output .= '