From ac0a51a8b5fddbde7a32274aef2a7793bfbc21f5 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Fri, 30 Jun 2023 09:15:15 +0200 Subject: [PATCH] =?UTF-8?q?Erreur=20de=20bool=C3=A9en?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/page/page.php | 2 +- core/module/user/user.php | 4 ++-- module/blog/blog.php | 4 ++-- module/gallery/gallery.php | 4 ++-- module/news/news.php | 5 ++++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/core/module/page/page.php b/core/module/page/page.php index 72cc05ca..e6ac44b4 100644 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -297,7 +297,7 @@ class page extends common else { // Soumission du formulaire if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) !== true && + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { // Si le Title n'est pas vide, premier test pour positionner la notification du champ obligatoire diff --git a/core/module/user/user.php b/core/module/user/user.php index ae3e5e6d..027b4f72 100644 --- a/core/module/user/user.php +++ b/core/module/user/user.php @@ -263,7 +263,7 @@ class user extends common else { // Soumission du formulaire if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) !== true && + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { // Double vérification pour le mot de passe @@ -1012,7 +1012,7 @@ class user extends common else { // Soumission du formulaire if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) !== true && + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { // Double vérification pour le mot de passe diff --git a/module/blog/blog.php b/module/blog/blog.php index 1c5a898a..16b23981 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -642,7 +642,7 @@ class blog extends common else { // Soumission du formulaire if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) !== true && + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { if ($this->getUser('group') === self::GROUP_ADMIN) { @@ -740,7 +740,7 @@ class blog extends common else { // Soumission du formulaire if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) !== true && + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { // Check la captcha diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php index 08b51973..ebac4dd7 100644 --- a/module/gallery/gallery.php +++ b/module/gallery/gallery.php @@ -923,7 +923,7 @@ class gallery extends common if ($this->getUrl(2) === 'galleries') { // Soumission du formulaire if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) !== true && + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { @@ -967,7 +967,7 @@ class gallery extends common } // Soumission du formulaire if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) !== true && + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { diff --git a/module/news/news.php b/module/news/news.php index 486fc7f6..b131cf74 100644 --- a/module/news/news.php +++ b/module/news/news.php @@ -410,7 +410,10 @@ class news extends common // La news existe else { // Soumission du formulaire - if ($this->getUser('permission', __CLASS__, __FUNCTION__) !== true && $this->isPost()) { + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && + $this->isPost() + ) { // Si l'id a changée $newsId = $this->getInput('newsEditTitle', helper::FILTER_ID, true); if ($newsId !== $this->getUrl(2)) {