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)
{
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']);
}
}
}

View File

@ -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

View File

@ -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
]);

View File

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