Check Modules

This commit is contained in:
Fred Tempez 2023-07-05 17:34:55 +02:00
parent 433342c2a8
commit 9f6202e639
4 changed files with 18 additions and 21 deletions

View File

@ -904,24 +904,21 @@ class blog extends common
*/ */
public function signature($userId) public function signature($userId)
{ {
if ($this->getUser('permission', __CLASS__, __FUNCTION__) !== true) { switch ($this->getData(['user', $userId, 'signature'])) {
switch ($this->getData(['user', $userId, 'signature'])) { case 1:
case 1: return $userId;
return $userId; break;
break; case 2:
case 2: return $this->getData(['user', $userId, 'pseudo']);
return $this->getData(['user', $userId, 'pseudo']); break;
break; case 3:
case 3: return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']); break;
break; case 4:
case 4: return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']); break;
break; default:
default: return $this->getData(['user', $userId, 'firstname']);
return $this->getData(['user', $userId, 'firstname']);
}
} }
} }
} }

View File

@ -1,6 +1,7 @@
# Version 3.10 # Version 3.10
- Bloque l'effacement selon le profil - Bloque l'effacement selon le profil
- Masque le code de vérification - Masque le code de vérification
- Export des données en CSV impossible
# Version 3.9 # Version 3.9
- Redirection des pages orphelines - Redirection des pages orphelines
# Version 3.8 # Version 3.8

View File

@ -235,7 +235,7 @@ class form extends common
{ {
$data = $this->getData(['module', $this->getUrl(0), 'data']); $data = $this->getData(['module', $this->getUrl(0), 'data']);
if ( if (
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true && $this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$data $data
) { ) {
// Pagination // Pagination
@ -297,7 +297,7 @@ class form extends common
fclose($fp); fclose($fp);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $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', 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/data',
'state' => true 'state' => true
]); ]);

View File

@ -177,7 +177,6 @@ class search extends common
$this->update(); $this->update();
if ( if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost() $this->isPost()
) { ) {
//Initialisations variables //Initialisations variables