From 839981c313ee806ea8cc263a081e911a164d1c4f Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 30 Apr 2023 16:25:08 +0200 Subject: bricoles --- controller/ckeditor.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'controller/ckeditor.php') diff --git a/controller/ckeditor.php b/controller/ckeditor.php index f73107d..4d4639d 100644 --- a/controller/ckeditor.php +++ b/controller/ckeditor.php @@ -68,9 +68,9 @@ function submitCKeditor() $Album = new Album($_GET['page'], 'discographie'); // on retrouve les données si nécessaire - if(isset($_SESSION['target']) && $_SESSION['target'] != '') + if(isset($_SESSION['file_code']) && $_SESSION['file_code'] != '') { - $Album->fileCode = $_SESSION['target']; + $Album->fileCode = $_SESSION['file_code']; $Album->readOne(); } @@ -79,7 +79,7 @@ function submitCKeditor() if(!empty($_FILES['upload']['name'])) { $nouvellePochette = $_FILES['upload']['name']; - $nouvellePochetteMini = pathinfo($_FILES['upload']['name'], PATHINFO_FILENAME) . '-mini.' . pathinfo($_FILES['upload']['name'], PATHINFO_EXTENSION); + $nouvellePochetteMini = pathinfo($_FILES['upload']['name'], PATHINFO_FILENAME) . '-mini.' . pathinfo($_FILES['upload']['name'], PATHINFO_EXTENSION); } else { @@ -90,7 +90,7 @@ function submitCKeditor() //var_dump($nouvellePochetteMini); die(); // enregistrement nouvel album - if(!isset($_SESSION['target']) || $_SESSION['target'] == '') + if(!isset($_SESSION['file_code']) || $_SESSION['file_code'] == '') { // page disco $Album->createVignette($nouveauTitre, $nouvelleAnnee, $nouvellePochette, $nouvellePochetteMini); @@ -105,7 +105,7 @@ function submitCKeditor() // modification else { - $Album->albumCode = $_SESSION['target']; + $Album->albumCode = $_SESSION['file_code']; // page disco $Album->format = 'json'; @@ -124,7 +124,7 @@ function submitCKeditor() { $Article = new Article($_GET['page'], $_GET['page']); - if(!isset($_SESSION['target']) || $_SESSION['target'] === '') + if(!isset($_SESSION['file_code']) || $_SESSION['file_code'] === '') { $Article->create($html); @@ -132,7 +132,7 @@ function submitCKeditor() } else { - $Article->fileCode = $_SESSION['target']; // erreur ici? + $Article->fileCode = $_SESSION['file_code']; // erreur ici? $Article->update($html); // update html-mini @@ -140,7 +140,7 @@ function submitCKeditor() } // nettoyage - unset($_SESSION['target']); + unset($_SESSION['file_code']); if($_GET['page'] === 'discographie' || $_GET['page'] === 'album') { -- cgit v1.2.3