FIX #yogosha9083
This commit is contained in:
parent
98da84f9b2
commit
117e1057e1
@ -137,18 +137,18 @@ if (empty($reshook)) {
|
|||||||
if (GETPOST('ajoutcomment')) {
|
if (GETPOST('ajoutcomment')) {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (!GETPOST('comment')) {
|
if (!GETPOST('comment', "alphanohtml")) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors');
|
||||||
}
|
}
|
||||||
if (!GETPOST('commentuser')) {
|
if (!GETPOST('commentuser', "alphanohtml")) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$comment = (string) GETPOST("comment", "restricthtml");
|
$comment = (string) GETPOST("comment", "alphanohtml");
|
||||||
$comment_user = (string) GETPOST('commentuser', "restricthtml");
|
$comment_user = (string) GETPOST('commentuser', "alphanohtml");
|
||||||
|
|
||||||
$resql = $object->addComment($comment, $comment_user);
|
$resql = $object->addComment($comment, $comment_user);
|
||||||
|
|
||||||
@ -422,7 +422,7 @@ print '<br>';
|
|||||||
if ($object->allow_comments) {
|
if ($object->allow_comments) {
|
||||||
print $langs->trans("AddACommentForPoll").'<br>';
|
print $langs->trans("AddACommentForPoll").'<br>';
|
||||||
print '<textarea name="comment" rows="2" class="quatrevingtpercent"></textarea><br>'."\n";
|
print '<textarea name="comment" rows="2" class="quatrevingtpercent"></textarea><br>'."\n";
|
||||||
print $langs->trans("Name").': <input type="text" class="minwidth300" name="commentuser" value="'.$user->getFullName($langs).'"> '."\n";
|
print $langs->trans("Name").': <input type="text" class="minwidth300" name="commentuser" value="'.dol_escape_htmltag($user->getFullName($langs)).'"> '."\n";
|
||||||
print '<input type="submit" class="button reposition" name="ajoutcomment" value="'.dol_escape_htmltag($langs->trans("AddComment")).'"><br>'."\n";
|
print '<input type="submit" class="button reposition" name="ajoutcomment" value="'.dol_escape_htmltag($langs->trans("AddComment")).'"><br>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -79,8 +79,8 @@ if (GETPOST('ajoutcomment', 'alpha')) {
|
|||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$comment = GETPOST("comment", 'restricthtml');
|
$comment = GETPOST("comment", 'alphanohtml');
|
||||||
$comment_user = GETPOST('commentuser', 'nohtml');
|
$comment_user = GETPOST('commentuser', 'alphanohtml');
|
||||||
|
|
||||||
if (!$comment) {
|
if (!$comment) {
|
||||||
$error++;
|
$error++;
|
||||||
@ -780,9 +780,9 @@ if ($comments) {
|
|||||||
if ($object->allow_comments) {
|
if ($object->allow_comments) {
|
||||||
print '<br><div class="addcomment"><span class="opacitymedium">'.$langs->trans("AddACommentForPoll")."</span><br>\n";
|
print '<br><div class="addcomment"><span class="opacitymedium">'.$langs->trans("AddACommentForPoll")."</span><br>\n";
|
||||||
|
|
||||||
print '<textarea name="comment" rows="'.ROWS_2.'" class="quatrevingtpercent">'.dol_escape_htmltag(GETPOST('comment', 'restricthtml'), 0, 1).'</textarea><br>'."\n";
|
print '<textarea name="comment" rows="'.ROWS_2.'" class="quatrevingtpercent">'.dol_escape_htmltag(GETPOST('comment', 'alphanohtml'), 0, 1).'</textarea><br>'."\n";
|
||||||
print $langs->trans("Name").': ';
|
print $langs->trans("Name").': ';
|
||||||
print '<input type="text" name="commentuser" maxlength="64" value="'.GETPOST('commentuser', 'nohtml').'"> '."\n";
|
print '<input type="text" name="commentuser" maxlength="64" value="'.dol_escape_htmltag(GETPOST('commentuser', 'alphanohtml')).'"> '."\n";
|
||||||
print '<input type="submit" class="button" name="ajoutcomment" value="'.dol_escape_htmltag($langs->trans("AddComment")).'"><br>'."\n";
|
print '<input type="submit" class="button" name="ajoutcomment" value="'.dol_escape_htmltag($langs->trans("AddComment")).'"><br>'."\n";
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user