From 1325b09fe9968e1a96999a1a24a313836774b48c Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 21 Aug 2020 09:45:59 +0200 Subject: [PATCH 1/3] =?UTF-8?q?d=C3=A9faut=20d'initialisation=20+=20libell?= =?UTF-8?q?=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/search/ressource/defaultdata.php | 2 +- module/search/search.php | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/module/search/ressource/defaultdata.php b/module/search/ressource/defaultdata.php index 74af410a..4eb9eaa6 100644 --- a/module/search/ressource/defaultdata.php +++ b/module/search/ressource/defaultdata.php @@ -8,7 +8,7 @@ class data extends search { public static $defaultData = [ 'previewLength' => 100, 'resultHideContent' => false, - 'placeHolder' => 'Un plusieurs mots-clés séparés par un espace ou par +', + 'placeHolder' => 'Un ou plusieurs mots-clés séparés par un espace ou par +', 'submitText' => 'Rechercher' ]; } \ No newline at end of file diff --git a/module/search/search.php b/module/search/search.php index ffa973aa..7b128f81 100755 --- a/module/search/search.php +++ b/module/search/search.php @@ -80,20 +80,19 @@ class search extends common { } public function index() { + // Création des valeurs de thème par défaut + if ( $this->getData(['theme', 'search']) === null ) { + require_once('module/search/ressource/defaultdata.php'); + $this->setData(['theme', 'search', theme::$defaultData]); + } + // Création des valeurs de réglage par défaut + var_dump($this->getData(['module', 'search'])); + if ( $this->getData(['module', 'search']) === null ) { + require_once('module/search/ressource/defaultdata.php'); + $this->setData(['module', $this->getUrl(0), data::$defaultData]); + } + if($this->isPost()) { - - // Création des valeurs de thème par défaut - if ( $this->getData(['theme', 'search']) === null ) { - require_once('module/search/ressource/defaultdata.php'); - $this->setData(['theme', 'search', theme::$defaultData]); - } - // Création des valeurs de réglage par défaut - if ( $this->getData(['module', 'search']) === null ) { - require_once('module/search/ressource/defaultdata.php'); - $this->setData(['module', $this->getUrl(0), data::$defaultData]); - } - - //Initialisations variables $success = true; $result = []; From 04d585b27717c72384d5d3e65fa52c93d03ac5c5 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 21 Aug 2020 09:50:06 +0200 Subject: [PATCH 2/3] =?UTF-8?q?libell=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/search/view/index/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/search/view/index/index.php b/module/search/view/index/index.php index 0b40c108..b87104b6 100755 --- a/module/search/view/index/index.php +++ b/module/search/view/index/index.php @@ -18,7 +18,7 @@
$module::$motentier, - 'help' => 'Pour rechercher une suite de mots-clés, les séparez par le symbole + plutôt que l\'espace.' + 'help' => 'Pour rechercher des mots-clés consécutifs, reliez-les par le symbole +.' ]); ?>
From 04978ab13a51e3534f63afe6bbb60025da33f301 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 21 Aug 2020 14:55:40 +0200 Subject: [PATCH 3/3] debug off --- module/search/search.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/search/search.php b/module/search/search.php index 7b128f81..d8e3fdde 100755 --- a/module/search/search.php +++ b/module/search/search.php @@ -86,7 +86,6 @@ class search extends common { $this->setData(['theme', 'search', theme::$defaultData]); } // Création des valeurs de réglage par défaut - var_dump($this->getData(['module', 'search'])); if ( $this->getData(['module', 'search']) === null ) { require_once('module/search/ressource/defaultdata.php'); $this->setData(['module', $this->getUrl(0), data::$defaultData]);