Merge branch '10400' into data_engine

This commit is contained in:
Fred Tempez 2020-10-19 18:21:36 +02:00
commit 22dfce63b9
12 changed files with 26 additions and 16 deletions

View File

@ -15,10 +15,10 @@
## version 10.3.03 ## version 10.3.03
- Correction : - Correction :
- Doublons de lignes. - Localisation, affichage des accents, LC_TIME devient LC_ALL
- Modifications : - Modifications :
- Configuration des captcha. Addition simple chiffres de 0 à 9. - Configuration des captcha. Addition simple chiffres de 0 à 9.
- Une icône remplace le terme Connexion dans le menu et dans le pied de page. - Une icône remplace Connexion dans le menu et dans le pied de page.
## version 10.3.02 ## version 10.3.02
- Corrections : - Corrections :

View File

@ -52,7 +52,7 @@ class template {
// Génère deux nombres pour le captcha // Génère deux nombres pour le captcha
$numbers = array(0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20); $numbers = array(0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20);
$letters = array('u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a'); $letters = array('u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a');
$limit = $attributes['limit'] ? 9 : count($letters)-1 ; $limit = $attributes['limit'] ? count($letters)-1 : 10 ;
$firstNumber = rand ( 0 , $limit ); $firstNumber = rand ( 0 , $limit );
$secondNumber = rand ( 0 , $limit ); $secondNumber = rand ( 0 , $limit );
$result = $firstNumber + $secondNumber; $result = $firstNumber + $secondNumber;

View File

@ -1441,7 +1441,7 @@ class common {
// Version 10.3.03 // Version 10.3.03
if ($this->getData(['core', 'dataVersion']) < 10303) { if ($this->getData(['core', 'dataVersion']) < 10303) {
// Activation par défaut du captcha à la connexion // Activation par défaut du captcha à la connexion
$this->setData(['config', 'connect','captcha10', false]); $this->setData(['config', 'captchaStrong', false]);
$this->setData(['core', 'dataVersion', 10303]); $this->setData(['core', 'dataVersion', 10303]);
} }
} }

View File

@ -470,6 +470,7 @@ class config extends common {
'proxyType' => $this->getInput('configProxyType'), 'proxyType' => $this->getInput('configProxyType'),
'proxyUrl' => $this->getInput('configProxyUrl'), 'proxyUrl' => $this->getInput('configProxyUrl'),
'proxyPort' => $this->getInput('configProxyPort',helper::FILTER_INT), 'proxyPort' => $this->getInput('configProxyPort',helper::FILTER_INT),
'captchaStrong' => $this->getInput('configCaptchaStrong',helper::FILTER_BOOLEAN),
'smtp' => [ 'smtp' => [
'enable' => $this->getInput('configSmtpEnable',helper::FILTER_BOOLEAN), 'enable' => $this->getInput('configSmtpEnable',helper::FILTER_BOOLEAN),
'host' => $this->getInput('configSmtpHost',helper::FILTER_STRING_SHORT), 'host' => $this->getInput('configSmtpHost',helper::FILTER_STRING_SHORT),
@ -485,7 +486,6 @@ class config extends common {
'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT), 'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT),
'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN), 'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN),
'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN), 'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN),
'captcha10' => $this->getInput('configConnectCaptcha10',helper::FILTER_BOOLEAN)
] ]
] ]
]); ]);

View File

@ -100,9 +100,9 @@
]); ?> ]); ?>
</div> </div>
<div class="col4 verticalAlignBottom"> <div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configConnectCaptcha10', true, 'Captcha simple', [ <?php echo template::checkbox('configCaptchaStrong', true, 'Captcha simple', [
'checked' => $this->getData(['config', 'connect','captcha10']), 'checked' => $this->getData(['config', 'captchaStrong']),
'help' => 'Addition limitée aux chiffres de 0 à 9. S\'applique à tous les captchas du site.' 'help' => 'Addition de nombres de 0 à 20.'
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -16,6 +16,7 @@ class init extends common {
'legalPageId' => 'mentions-legales', 'legalPageId' => 'mentions-legales',
'searchPageId' => 'recherche', 'searchPageId' => 'recherche',
'maintenance' => false, 'maintenance' => false,
'captchaStrong' => false,
'social' => [ 'social' => [
'facebookId' => 'facebook', 'facebookId' => 'facebook',
'instagramId' => '', 'instagramId' => '',

View File

@ -170,8 +170,7 @@
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [ <?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [
'checked' => $this->getData(['theme', 'menu', 'loginLink']), 'checked' => $this->getData(['theme', 'menu', 'loginLink'])
'help' => 'L\'activation de cette option n\'est pas recommandée'
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">

View File

@ -594,7 +594,17 @@ class user extends common {
AND array_key_exists('prenom',$item) AND array_key_exists('prenom',$item)
AND array_key_exists('nom',$item) AND array_key_exists('nom',$item)
AND array_key_exists('groupe',$item) AND array_key_exists('groupe',$item)
AND array_key_exists('email',$item) ) { AND array_key_exists('email',$item)
AND $item['nom']
AND $item['prenom']
AND $item['id']
AND $item['email']
AND $item['groupe']
) {
// Validation du groupe
$item['groupe'] = (int) $item['groupe'];
$item['groupe'] = ( $item['groupe'] >= self::GROUP_BANNED AND $item['groupe'] <= self::GROUP_ADMIN )
? $item['groupe'] : 1;
// L'utilisateur existe // L'utilisateur existe
if ( $this->getData(['user',helper::filter($item['id'] , helper::FILTER_ID)])) if ( $this->getData(['user',helper::filter($item['id'] , helper::FILTER_ID)]))
{ {
@ -620,7 +630,7 @@ class user extends common {
$userId, [ $userId, [
'firstname' => $item['prenom'], 'firstname' => $item['prenom'],
'forgot' => 0, 'forgot' => 0,
'group' => (int) $item['groupe'], 'group' => $item['groupe'] ,
'lastname' => $item['nom'], 'lastname' => $item['nom'],
'mail' => $item['email'], 'mail' => $item['email'],
'pseudo' => $item['prenom'], 'pseudo' => $item['prenom'],

View File

@ -56,7 +56,7 @@
<?php echo template::table([1, 3, 3, 1, 1, 2, 1, 1 ], $module::$users, ['Identifiant', 'Nom', 'Prénom','Groupe', 'Pseudo', 'eMail', 'Succès']); ?> <?php echo template::table([1, 3, 3, 1, 1, 2, 1, 1 ], $module::$users, ['Identifiant', 'Nom', 'Prénom','Groupe', 'Pseudo', 'eMail', 'Succès']); ?>
<div class="row"> <div class="row">
<div class="col12 textAlignCenter"> <div class="col12 textAlignCenter">
<?php echo template::ico('check');?> Compte créé | <?php echo template::ico('comment');?> Compte créé et notifié | <?php echo template::ico('cancel');?> Erreur <?php echo template::ico('check');?> Compte créé | <?php echo template::ico('comment');?> Compte créé et notifié | <?php echo template::ico('cancel');?> ou manquant : erreur, compte non importé
</div> </div>
</div> </div>
<?php endif;?> <?php endif;?>

View File

@ -16,7 +16,7 @@
<div class="row"> <div class="row">
<div class="col12 textAlignCenter"> <div class="col12 textAlignCenter">
<?php echo template::captcha('userLoginCaptcha', [ <?php echo template::captcha('userLoginCaptcha', [
'limit' => $this->getData(['config','connect','captcha10']) 'limit' => $this->getData(['config','captchaStrong'])
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -98,7 +98,7 @@
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::captcha('blogArticleCaptcha', [ <?php echo template::captcha('blogArticleCaptcha', [
'limit' => $this->getData(['config','connect','captcha10']) 'limit' => $this->getData(['config','captchaStrong'])
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -47,7 +47,7 @@
<div class="row"> <div class="row">
<div class="col5"> <div class="col5">
<?php echo template::captcha('formCaptcha', [ <?php echo template::captcha('formCaptcha', [
'limit' => $this->getData(['config','connect','captcha10']) 'limit' => $this->getData(['config','captchaStrong'])
]); ?> ]); ?>
</div> </div>
</div> </div>