This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen_1.x. See https://gitlab.nuiton.org/None/pollen_1.x.git commit 3dee9e30f0cc645623859913af6e5b0c02d41f02 Author: Kevin Morin <morin@codelutin.com> Date: Mon Feb 27 10:33:23 2017 +0100 fixes #1301 [Comment] Add anti spam filter vote vote and comments --- .../main/java/org/chorem/pollen/ui/actions/poll/vote/AddComment.java | 2 +- .../src/main/resources/i18n/pollen-ui-struts2_en_GB.properties | 1 + .../src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties | 1 + pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/AddComment.java b/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/AddComment.java index b2eebfc..2f08bb5 100644 --- a/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/AddComment.java +++ b/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/poll/vote/AddComment.java @@ -89,7 +89,7 @@ public class AddComment extends AbstractVoteAction implements Preparable { // if a value is filled, this should a spam robot that try to fill all field // reject actin in this case if (StringUtils.isNotBlank(commentUrl)) { - addActionError(t("pollen.error.comment.spam")); + addActionError(_("pollen.error.comment.spam")); } } diff --git a/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties b/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties index d8ad540..6b67b4a 100644 --- a/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties +++ b/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties @@ -174,6 +174,7 @@ pollen.common.votingList=Group pollen.common.weight=Weight pollen.error.choice.empty=%s mandatory pollen.error.comment.name.empty=Comment name mandatory +pollen.error.comment.spam=An error occured pollen.error.comment.text.empty=Comment text mandatory pollen.error.date.format=Date does not match pattern MM/dd/yyyy [hh\:mm] (example 12/31/2000 12\:59) pollen.error.email.invalid=The email doesn't have the good format diff --git a/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties b/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties index 9a96c2c..0cc2b7c 100644 --- a/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties +++ b/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties @@ -176,6 +176,7 @@ pollen.common.votingList=Groupe pollen.common.weight=Poids pollen.error.choice.empty=%s obligatoire pollen.error.comment.name.empty=Nom du commentaire obligatoire +pollen.error.comment.spam=Une erreur s'est produite pollen.error.comment.text.empty=Texte du commentaire obligatoire pollen.error.date.format=La date doit ĂȘtre au format jj/MM/aaaa [hh\:mm] (exemple 31/12/2000 23\:59) pollen.error.email.invalid=Email non valide diff --git a/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp b/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp index 40a5bd8..2533634 100644 --- a/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp +++ b/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/poll/vote.jsp @@ -397,7 +397,7 @@ label="%{getText('pollen.common.commentAuthor')}"/> <%-- anti spam field --%> - <input type="text" name="commentUrl" class="hidden" /> + <input type="text" name="commentUrl" class="hidden" value="" /> <s:url var="configUrl" value='/js/ckeditor.config.js'/> <sjr:ckeditor key="commentText" requiredLabel="true" -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.