Compare commits

..

No commits in common. "286e49653ead3b4e785b4fd7c8694c707033dd25" and "3a0c0c145806fc79d7a9da1b8d1a05d36824e6ed" have entirely different histories.

1 changed files with 3 additions and 11 deletions

View File

@ -288,23 +288,15 @@
} }
if($curentuser!="anon.") { if($curentuser!="anon.") {
$visitedate=clone $curentuser->getVisitedate();
if($visitedate) $visitedate->add(new \DateInterval("PT1H"));
$now=new \DateTime(); $now=new \DateTime();
if(!$curentuser->getVisitedate()) { if($visitedate<$now) {
$curentuser->setVisitedate($now); $curentuser->setVisitedate($now);
$curentuser->setVisitecpt($curentuser->getVisitecpt()+1); $curentuser->setVisitecpt($curentuser->getVisitecpt()+1);
$this->em->persist($curentuser); $this->em->persist($curentuser);
$this->em->flush(); $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();
}
}
} }
} }
} }