diff --git a/core/core.php b/core/core.php
index a3b8ba4..8296d27 100644
--- a/core/core.php
+++ b/core/core.php
@@ -1263,7 +1263,9 @@ class common {
if ((sizeof($blocks) === 1 || in_array($this->getUrl(1),$pattern) ) ) {
// Pleine page en mode configuration
$this->showContent();
- if( $this->getData(['page', $this->getUrl(0), 'commentEnable']) === true && strlen($this->getUrl(1)) < 3 ) $this->showComment();
+ $strlenUrl1 = 0;
+ if( $this->getUrl(1) !== null) $strlenUrl1 = strlen($this->getUrl(1));
+ if( $this->getData(['page', $this->getUrl(0), 'commentEnable']) === true && $strlenUrl1 < 3 ) $this->showComment();
if (file_exists(self::DATA_DIR . 'body.inc.php')) {
include( self::DATA_DIR . 'body.inc.php');
}
@@ -1299,7 +1301,9 @@ class common {
*/
echo '
';
$this->showContent();
- if( $this->getData(['page', $this->getUrl(0), 'commentEnable']) === true && strlen($this->getUrl(1)) < 3 ) $this->showComment();
+ $strlenUrl1 = 0;
+ if( $this->getUrl(1) !== null) $strlenUrl1 = strlen($this->getUrl(1));
+ if( $this->getData(['page', $this->getUrl(0), 'commentEnable']) === true && $strlenUrl1 < 3 ) $this->showComment();
if (file_exists(self::DATA_DIR . 'body.inc.php')) {
include(self::DATA_DIR . 'body.inc.php');
}
diff --git a/core/include/comment.inc.php b/core/include/comment.inc.php
index 71506ad..307b19f 100644
--- a/core/include/comment.inc.php
+++ b/core/include/comment.inc.php
@@ -28,7 +28,7 @@ if($this->isPost() && isset($_POST['commentPageFormSubmit']) ) {
// $notice concerne la détection d'erreurs
- $notice = '';
+ $notice = ''; $detectBot='';
$code = null !== $this->getInput('codeCaptcha') ? $this->getInput('codeCaptcha') : '';
// Captcha demandée
if( $this->getData(['config', 'social', 'comment', 'captcha']) ){
@@ -97,7 +97,8 @@ if($this->isPost() && isset($_POST['commentPageFormSubmit']) ) {
}
// Emission du mail
// Rechercher l'adresse en fonction du mail
- $singleuser = $this->getData(['user', $listUsers[$this->getData(['config', 'social', 'comment', 'user'])], 'mail']);
+ $singleuser = '';
+ if( $this->getData(['config', 'social', 'comment', 'user']) !== '' ) $singleuser = $this->getData(['user', $listUsers[$this->getData(['config', 'social', 'comment', 'user'])], 'mail']);
$singlemail = $this->getData(['config', 'social', 'comment', 'mail']);
$group = $this->getData(['config', 'social', 'comment', 'group']);
// Verification si le mail peut être envoyé
@@ -167,6 +168,8 @@ if($this->isPost() && isset($_POST['commentPageFormSubmit']) ) {
// Préparation de la liste paginée des commentaires // Initialisation de la pagination
$nbPage =0;
+$data=[];
+$pagesComment = '';
if ( !isset($_SESSION[$commentNumPage] )) $_SESSION[$commentNumPage] = 1;
$dataPage = $this->getData(['comment', $this->getUrl(0), 'data']);
if ( NULL !== $dataPage && is_array($dataPage) && $dataPage !== [] ) {
diff --git a/core/layout/main.php b/core/layout/main.php
index 2250f67..53d4324 100644
--- a/core/layout/main.php
+++ b/core/layout/main.php
@@ -17,7 +17,9 @@ else { echo ''; }
- getData(['page', $this->getUrl(0), 'commentEnable']) === true && strlen($this->getUrl(1)) < 3 ) {?>
+ getUrl(1) !== null) $strlenUrl1 = strlen($this->getUrl(1));
+ if( $this->getData(['page', $this->getUrl(0), 'commentEnable']) === true && $strlenUrl1 < 3 ) {?>
showStyle();
$this->showSharedVariables();