From 9f6202e639824e355bc9d807c19e3e4830577fc8 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Wed, 5 Jul 2023 17:34:55 +0200 Subject: [PATCH] Check Modules --- module/blog/blog.php | 33 +++++++++++++++------------------ module/form/changes.md | 1 + module/form/form.php | 4 ++-- module/search/search.php | 1 - 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index 16b23981..43a0b36f 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -904,24 +904,21 @@ class blog extends common */ public function signature($userId) { - if ($this->getUser('permission', __CLASS__, __FUNCTION__) !== true) { - switch ($this->getData(['user', $userId, 'signature'])) { - case 1: - return $userId; - break; - case 2: - return $this->getData(['user', $userId, 'pseudo']); - break; - case 3: - return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']); - break; - case 4: - return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']); - break; - default: - return $this->getData(['user', $userId, 'firstname']); - } + switch ($this->getData(['user', $userId, 'signature'])) { + case 1: + return $userId; + break; + case 2: + return $this->getData(['user', $userId, 'pseudo']); + break; + case 3: + return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']); + break; + case 4: + return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']); + break; + default: + return $this->getData(['user', $userId, 'firstname']); } - } } \ No newline at end of file diff --git a/module/form/changes.md b/module/form/changes.md index 91770236..3a42994b 100644 --- a/module/form/changes.md +++ b/module/form/changes.md @@ -1,6 +1,7 @@ # Version 3.10 - Bloque l'effacement selon le profil - Masque le code de vérification +- Export des données en CSV impossible # Version 3.9 - Redirection des pages orphelines # Version 3.8 diff --git a/module/form/form.php b/module/form/form.php index a3696501..6c851e55 100644 --- a/module/form/form.php +++ b/module/form/form.php @@ -235,7 +235,7 @@ class form extends common { $data = $this->getData(['module', $this->getUrl(0), 'data']); if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) !== true && + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $data ) { // Pagination @@ -297,7 +297,7 @@ class form extends common fclose($fp); // Valeurs en sortie $this->addOutput([ - 'notification' => sprintf(helper::translate('Export CSV effectué dans %1 '), $csvfilename), + 'notification' => sprintf(helper::translate('Export CSV effectué dans %s '), $csvfilename ), 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/data', 'state' => true ]); diff --git a/module/search/search.php b/module/search/search.php index 17fb043b..d19a11ca 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -177,7 +177,6 @@ class search extends common $this->update(); if ( - $this->getUser('permission', __CLASS__, __FUNCTION__) === true && $this->isPost() ) { //Initialisations variables