amélioration journalisation
This commit is contained in:
parent
362852852a
commit
ab6f64d511
|
@ -2659,14 +2659,15 @@ class core extends common {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
// Journalisation
|
// 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'])) {
|
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);
|
file_put_contents(self::DATA_DIR . 'journal.log', $dataLog, FILE_APPEND);
|
||||||
}
|
}
|
||||||
// Force la déconnexion des membres bannis ou d'une seconde session
|
// Force la déconnexion des membres bannis ou d'une seconde session
|
||||||
|
|
Loading…
Reference in New Issue