diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index d8fa9651d98..dcf4b6fb998 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3097,7 +3097,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
if (empty($srconly) && in_array($pictowithoutext, array(
- 'bank', 'close_title', 'delete', 'edit', 'filter', 'grip', 'grip_title', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
+ 'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
'switch_off', 'switch_on', 'unlink', 'uparrow')
)) {
$fakey = $pictowithoutext;
diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang
index 1f8a90b5657..0819a077f71 100644
--- a/htdocs/langs/en_US/opensurvey.lang
+++ b/htdocs/langs/en_US/opensurvey.lang
@@ -57,4 +57,5 @@ ErrorInsertingComment=There was an error while inserting your comment
MoreChoices=Enter more choices for the voters
SurveyExpiredInfo=The poll has been closed or voting delay has expired.
EmailSomeoneVoted=%s has filled a line.\nYou can find your poll at the link: \n%s
-ShowSurvey=Show survey
\ No newline at end of file
+ShowSurvey=Show survey
+UserMustBeSameThanUserUsedToVote=You must have voted and use the same user name, that the one used to vote, to post a comment
\ No newline at end of file
diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php
index 742b949e27c..32cb5f2e1ba 100644
--- a/htdocs/public/opensurvey/studs.php
+++ b/htdocs/public/opensurvey/studs.php
@@ -66,22 +66,28 @@ if (GETPOST('ajoutcomment','alpha'))
$error=0;
- if (! GETPOST('comment','none'))
+ $comment = GETPOST("comment",'none');
+ $comment_user = GETPOST('commentuser','nohtml');
+
+ if (! $comment)
{
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors');
}
- if (! GETPOST('commentuser','nohtml'))
+ if (! $comment_user)
{
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors');
}
+ if (! in_array($comment_user, $listofvoters))
+ {
+ setEventMessages($langs->trans("UserMustBeSameThanUserUsedToVote"), null, 'errors');
+ $error++;
+ }
+
if (! $error)
{
- $comment = GETPOST("comment",'none');
- $comment_user = GETPOST('commentuser','nohtml');
-
$resql = $object->addComment($comment, $comment_user);
if (! $resql) dol_print_error($db);
@@ -729,8 +735,12 @@ if ($comments)
print "
" . $langs->trans("CommentsOfVoters") . ":
\n";
foreach ($comments as $obj) {
+ // ligne d'un usager pré-authentifié
+ //$mod_ok = (in_array($obj->name, $listofvoters));
+
print '