diff --git a/core/core.php b/core/core.php index aa11819..b5cbb67 100644 --- a/core/core.php +++ b/core/core.php @@ -2659,14 +2659,15 @@ class core extends common { exit(); } // Journalisation - $dataLog = mb_detect_encoding(date('d\/m\/y',time()), 'UTF-8', true) - ? date('d\/m\/y',time()) . ';' . date('H\:i',time()) . ';' - : utf8_encode(date('d\/m\/y',time())) . ';' . utf8_encode(date('H\:i',time())) . ';' ; - $dataLog .= helper::getIp($this->getData(['config','connect','anonymousIp'])) . ';'; - $dataLog .= $this->getUser('id') ? $this->getUser('id') . ';' : 'anonyme' . ';'; - $dataLog .= $this->getUrl(); - $dataLog .= PHP_EOL; if ($this->getData(['config','connect','log'])) { + $time = time(); + $dataLog = mb_detect_encoding(date('d\/m\/y',$time), 'UTF-8', true) + ? date('d\/m\/y',$time) . ';' . date('H\:i',$time) . ';' + : utf8_encode(date('d\/m\/y',$time)) . ';' . utf8_encode(date('H\:i',$time)) . ';' ; + $dataLog .= helper::getIp($this->getData(['config','connect','anonymousIp'])) . ';'; + $dataLog .= $this->getUser('id') ? $this->getUser('id') . ';' : 'anonyme' . ';'; + $dataLog .= $this->getUrl(); + $dataLog .= PHP_EOL; file_put_contents(self::DATA_DIR . 'journal.log', $dataLog, FILE_APPEND); } // Force la déconnexion des membres bannis ou d'une seconde session