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 ea2ea5e1..c83fdffd 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/EventListener/sessionListener.php
@@ -286,7 +286,7 @@
}
if($curentuser!="anon.") {
- $visitedate=$curentuser->getVisitedate();
+ $visitedate=clone $curentuser->getVisitedate();
if($visitedate) $visitedate->add(new \DateInterval("PT1H"));
$now=new \DateTime();
if($visitedate<$now) {
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php
index a787af90..7ccbefd2 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Form/UserType.php
@@ -378,7 +378,7 @@ class UserType extends AbstractType
$builder->add('visitedate', DateTimeType::class, [
"label" => 'Date de dernière visite',
"disabled" => true,
- "required" => ($fields["visite"]["perm"]==2),
+ "required" => ($fields["visite"]["perm"]==2),
"widget" => 'single_text',
]);
diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/view.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/view.html.twig
index 103beb28..341f3c4c 100644
--- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/view.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/User/view.html.twig
@@ -19,7 +19,7 @@
{%if user.job %}Métier = {{ user.job }}
{%endif%}
{%if user.position %}Fonction = {{ user.position }}
{%endif%}
{%if user.postaladress %}Adresse = {{ user.postaladress }}
{%endif%}
- {%if user.visitedate %}Date de dernière visite = {{ user.visitedate|date("d/m/Y H:i") }}
{%endif%}
+ {%if user.visitedate %}Date de dernière visite = {{ user.visitedate|date('d/m/Y H:i') }}
{%endif%}
{%if user.visitecpt %}Nombre de visites = {{ user.visitecpt }}
{%endif%}
{% set fgtitle=false %}
diff --git a/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Controller/ChatController.php b/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Controller/ChatController.php
index 28fc7484..a245ce2a 100644
--- a/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Controller/ChatController.php
+++ b/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Controller/ChatController.php
@@ -59,8 +59,11 @@ class ChatController extends Controller
$messages=$em->getRepository("CadolesWebsocketBundle:Message")->findBy(["group"=>$group],["submitdate"=>"DESC"],30);
foreach($messages as $message) {
$haveread = ($message->getReaders()->contains($user));
- $message->setHaveread($haveread);
+ $havesee = ($message->getSees()->contains($user));
+ $message->setHaveread($haveread);
+ $message->setHavesee($havesee);
+
if(!$haveread) {
$message->addReader($this->getUser());
$em->persist($message);
diff --git a/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Entity/Message.php b/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Entity/Message.php
index 55ac5444..e9b692a2 100644
--- a/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Entity/Message.php
+++ b/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Entity/Message.php
@@ -70,7 +70,18 @@ class Message
return $this;
}
-
+
+ private $havesee;
+ public function getHavesee()
+ {
+ return $this->havesee;
+ }
+ public function setHavesee($havesee) {
+ $this->havesee = $havesee;
+
+ return $this;
+ }
+
/**
* Constructor
*/
diff --git a/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Resources/views/Chat/client.html.twig b/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Resources/views/Chat/client.html.twig
index 87f21ffb..7f71eb23 100644
--- a/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Resources/views/Chat/client.html.twig
+++ b/src/ninegate-1.0/src/Cadoles/WebsocketBundle/Resources/views/Chat/client.html.twig
@@ -30,6 +30,9 @@
.message-toread {
font-weight:bold;
}
+ .message-see {
+ display:none;
+ }
.msgavatar {
float:left;
@@ -63,10 +66,12 @@
{{ form_start(form) }}