diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php index eafe98ca..55288b62 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php @@ -54,11 +54,6 @@ $session->set($config->getId(), strval($config->getValue())); } - - // Calcul des couleurs - $color = $this->container->get('cadoles.core.service.color'); - $color->setColor(); - // Utilisateur en cours $curentuserid=0; $token = $this->token_storage->getToken(); @@ -303,9 +298,13 @@ } - } + // Calcul des couleurs + $color = $this->container->get('cadoles.core.service.color'); + $color->setColor(); + + // Visite if($curentuser!="anon.") { $now=new \DateTime(); if(!$curentuser->getVisitedate()) { diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PageController.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PageController.php index f59166b9..7ebc3683 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PageController.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Controller/PageController.php @@ -517,21 +517,23 @@ class PageController extends Controller // Compteur de visite if($this->getUser()) { - $group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid); - if($group && $group->getFgcanshare()) { - $usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["group"=>$group,"user"=>$this->getUser()]); - if($usergroup) { - $visitedate=$usergroup->getVisitedate(); - if($visitedate) $visitedate->add(new \DateInterval("PT1H")); - $now=new \DateTime(); - if($visitedate<$now) { - $usergroup->setVisitedate($now); - $usergroup->setVisitecpt($usergroup->getVisitecpt()+1); - $em->persist($usergroup); - $em->flush(); - } - } - } + if($groupid) { + $group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid); + if($group && $group->getFgcanshare()) { + $usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["group"=>$group,"user"=>$this->getUser()]); + if($usergroup) { + $visitedate=$usergroup->getVisitedate(); + if($visitedate) $visitedate->add(new \DateInterval("PT1H")); + $now=new \DateTime(); + if($visitedate<$now) { + $usergroup->setVisitedate($now); + $usergroup->setVisitecpt($usergroup->getVisitecpt()+1); + $em->persist($usergroup); + $em->flush(); + } + } + } + } } // Type Calendrier diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewchat.html.twig b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewchat.html.twig index 94e0b66f..bc298d56 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewchat.html.twig +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Resources/views/Pagewidget/viewchat.html.twig @@ -22,6 +22,8 @@ {% if colorbodyfont is null %} {% set colorbodyfont = color['fontcolorhover'] %} {% endif %} +{% set colorbody = color['colorbody'] %} +{% set colormain = color['main'] %} {% if app.user %} @@ -37,7 +39,7 @@ {% if onheader %}
{% else %}