From fdef77d4a8817b6e8940951f3301ad94bde0e6c6 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 5 Jun 2023 14:51:09 +0200 Subject: suppression de $_SESSION['file_code'] --- model/Album.php | 2 +- model/Article.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'model') diff --git a/model/Album.php b/model/Album.php index 801afef..1954800 100644 --- a/model/Album.php +++ b/model/Album.php @@ -160,7 +160,7 @@ class Album extends Article $albumJSON = json_encode([$titre, $annee, $pochette, $pochetteMini]); // écriture - $nom_fichier = 'data/discographie/json/' . $this->albumCode . '.json'; + $nom_fichier = 'data/discographie/json/' . $this->fileCode . '.json'; $fichier = fopen($nom_fichier, 'w+'); // w pour créer ou écraser fputs($fichier, $albumJSON); fclose($fichier); diff --git a/model/Article.php b/model/Article.php index d94ba01..3eca127 100644 --- a/model/Article.php +++ b/model/Article.php @@ -17,8 +17,7 @@ class Article public $fileList; // = toutes les données // pour un article (ou album) spécifique - //public $fileName = ''; // = $_SESSION['nomFichier'] - public $fileCode = ''; // = $_SESSION['file_code'] + public $fileCode = ''; // = $_SERVER['HTTP_REFERER'] protected $time; // timestamp pour noms des fichiers créés public function __construct(string $page, string $folder) -- cgit v1.2.3