Merge branch 'master' into dist/envole/6/master
This commit is contained in:
commit
286e49653e
@ -288,15 +288,23 @@
|
||||
}
|
||||
|
||||
if($curentuser!="anon.") {
|
||||
$visitedate=clone $curentuser->getVisitedate();
|
||||
if($visitedate) $visitedate->add(new \DateInterval("PT1H"));
|
||||
$now=new \DateTime();
|
||||
if($visitedate<$now) {
|
||||
if(!$curentuser->getVisitedate()) {
|
||||
$curentuser->setVisitedate($now);
|
||||
$curentuser->setVisitecpt($curentuser->getVisitecpt()+1);
|
||||
$this->em->persist($curentuser);
|
||||
$this->em->flush();
|
||||
}
|
||||
else {
|
||||
$visitedate=clone $curentuser->getVisitedate();
|
||||
$visitedate->add(new \DateInterval("PT1H"));
|
||||
if($visitedate<$now) {
|
||||
$curentuser->setVisitedate($now);
|
||||
$curentuser->setVisitecpt($curentuser->getVisitecpt()+1);
|
||||
$this->em->persist($curentuser);
|
||||
$this->em->flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user