summaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/Album.php2
-rw-r--r--model/Article.php3
2 files changed, 2 insertions, 3 deletions
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
160 $albumJSON = json_encode([$titre, $annee, $pochette, $pochetteMini]); 160 $albumJSON = json_encode([$titre, $annee, $pochette, $pochetteMini]);
161 161
162 // écriture 162 // écriture
163 $nom_fichier = 'data/discographie/json/' . $this->albumCode . '.json'; 163 $nom_fichier = 'data/discographie/json/' . $this->fileCode . '.json';
164 $fichier = fopen($nom_fichier, 'w+'); // w pour créer ou écraser 164 $fichier = fopen($nom_fichier, 'w+'); // w pour créer ou écraser
165 fputs($fichier, $albumJSON); 165 fputs($fichier, $albumJSON);
166 fclose($fichier); 166 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
17 public $fileList; // = toutes les données 17 public $fileList; // = toutes les données
18 18
19 // pour un article (ou album) spécifique 19 // pour un article (ou album) spécifique
20 //public $fileName = ''; // = $_SESSION['nomFichier'] 20 public $fileCode = ''; // = $_SERVER['HTTP_REFERER']
21 public $fileCode = ''; // = $_SESSION['file_code']
22 protected $time; // timestamp pour noms des fichiers créés 21 protected $time; // timestamp pour noms des fichiers créés
23 22
24 public function __construct(string $page, string $folder) 23 public function __construct(string $page, string $folder)