deprecated et warnings

This commit is contained in:
Deltacms 2024-02-06 10:38:57 +01:00
parent a9279f5473
commit 5eed8d2a59
3 changed files with 14 additions and 5 deletions

View File

@ -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 '<div class="'. $content . '" id="contentSite">';
$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');
}

View File

@ -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 !== [] ) {

View File

@ -17,7 +17,9 @@ else { echo '<html lang="'.$lang.'">'; }
<link rel="stylesheet" href="core/vendor/normalize/normalize.min.css">
<link rel="stylesheet" href="core/layout/common.css">
<link rel="stylesheet" href="<?php echo self::DATA_DIR; ?>theme.css">
<?php if( $this->getData(['page', $this->getUrl(0), 'commentEnable']) === true && strlen($this->getUrl(1)) < 3 ) {?> <link rel="stylesheet" href="core/layout/pageComment.css"><?php }?>
<?php $strlenUrl1 = 0;
if( $this->getUrl(1) !== null) $strlenUrl1 = strlen($this->getUrl(1));
if( $this->getData(['page', $this->getUrl(0), 'commentEnable']) === true && $strlenUrl1 < 3 ) {?> <link rel="stylesheet" href="core/layout/pageComment.css"><?php }?>
<link rel="stylesheet" href="core/layout/mediaqueries.css">
<?php $this->showStyle();
$this->showSharedVariables();