diff options
author | polo <ordipolo@gmx.fr> | 2023-06-05 14:51:09 +0200 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2023-06-05 14:51:09 +0200 |
commit | fdef77d4a8817b6e8940951f3301ad94bde0e6c6 (patch) | |
tree | a9c4649d5171f7bb15fca6ec21bcd16d716841c5 /model | |
parent | a1c45fb18579f392070a65cf2c48e8b6bf5bf384 (diff) | |
download | melaine-fdef77d4a8817b6e8940951f3301ad94bde0e6c6.zip |
suppression de $_SESSION['file_code']
Diffstat (limited to 'model')
-rw-r--r-- | model/Album.php | 2 | ||||
-rw-r--r-- | model/Article.php | 3 |
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) |