From afbc7053e3b98d911356f85630e369e613c13107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Mon, 21 Mar 2022 19:22:34 +0100 Subject: [PATCH] =?UTF-8?q?Check=20pr=C3=A9sence=20feuille=20de=20style=20?= =?UTF-8?q?avant=20chargement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/gallery/changes.md | 4 +++- module/gallery/gallery.php | 6 ++++-- module/news/changes.md | 5 +++-- module/news/news.php | 6 ++++-- module/search/search.php | 6 ++++-- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/module/gallery/changes.md b/module/gallery/changes.md index 5eaca775..7b9232af 100644 --- a/module/gallery/changes.md +++ b/module/gallery/changes.md @@ -1,2 +1,4 @@ # version 3.4 - - Changement de nom du bouton Thème devient mise en page \ No newline at end of file + - Changement de nom du bouton Thème devient mise en page +# Version 3.5 + - Appel de la feuille de style si présente \ No newline at end of file diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 01ed3591..6c77cdbf 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -17,7 +17,7 @@ class gallery extends common { - const VERSION = '3.4'; + const VERSION = '3.5'; const REALNAME = 'Galerie'; const DELETE = true; const UPDATE = '0.0'; @@ -665,7 +665,9 @@ class gallery extends common { 'showBarEditButton' => true, 'title' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'config', 'name']), 'view' => 'gallery', - 'style' => $this->getData(['module', $this->getUrl(0), 'theme', 'style']) + 'style' => file_exists($this->getData(['module', $this->getUrl(0), 'theme', 'style'])) + ? $this->getData(['module', $this->getUrl(0), 'theme', 'style']) + : '' ]); } // Pas d'image dans la galerie diff --git a/module/news/changes.md b/module/news/changes.md index ea0c25f1..2bb1ae9b 100644 --- a/module/news/changes.md +++ b/module/news/changes.md @@ -1,6 +1,7 @@ -# Version 4 +# Version 4.2 - Config : le nombre d'objet est fixe, constante dans news.php - Ecran layout réservé à la configuration et au thème - Bug avec l'initialisation, fichier css déclaré mais absent + - Appel de la feuille style si présente - A faire partie CSS à amléiorer au niveau des options \ No newline at end of file + A faire partie CSS à amléiorer au niveau des options diff --git a/module/news/news.php b/module/news/news.php index c1a72177..32b1e2a8 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -15,7 +15,7 @@ class news extends common { - const VERSION = '4.1'; + const VERSION = '4.2'; const REALNAME = 'News'; const DELETE = true; const UPDATE = '0.0'; @@ -515,7 +515,9 @@ class news extends common { 'showBarEditButton' => true, 'showPageContent' => true, 'view' => 'index', - 'style' => $this->getData(['module', $this->getUrl(0),'theme', 'style']) + 'style' => file_exists($this->getData(['module', $this->getUrl(0), 'theme', 'style'])) + ? $this->getData(['module', $this->getUrl(0), 'theme', 'style']) + : '' ]); } diff --git a/module/search/search.php b/module/search/search.php index bc343a02..719430b2 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -19,7 +19,7 @@ class search extends common { - const VERSION = '2.4'; + const VERSION = '2.6'; const REALNAME = 'Recherche'; const DELETE = true; const UPDATE = '0.0'; @@ -313,7 +313,9 @@ class search extends common { 'view' => 'index', 'showBarEditButton' => true, 'showPageContent' => !$this->getData(['module', $this->getUrl(0), 'config', 'resultHideContent']), - 'style' => $this->getData(['module', $this->getUrl(0), 'theme', 'style']) + 'style' => file_exists($this->getData(['module', $this->getUrl(0), 'theme', 'style'])) + ? $this->getData(['module', $this->getUrl(0), 'theme', 'style']) + : '' ]); } else { // Valeurs en sortie, affichage du formulaire