Added some security in add_comment.php

This commit is contained in:
Antonin 2016-04-29 18:44:33 +02:00
parent 6d6334aa6d
commit 62cc6f6f09
2 changed files with 10 additions and 0 deletions

View File

@ -78,6 +78,7 @@ if (!$poll) {
$comments = $pollService->allCommentsByPollId($poll_id); $comments = $pollService->allCommentsByPollId($poll_id);
} }
error_reporting(E_ALL & ~E_NOTICE);
$smarty->error_reporting = E_ALL & ~E_NOTICE; $smarty->error_reporting = E_ALL & ~E_NOTICE;
$smarty->assign('comments', $comments); $smarty->assign('comments', $comments);
$comments_html = $smarty->fetch('part/comments_list.tpl'); $comments_html = $smarty->fetch('part/comments_list.tpl');

View File

@ -0,0 +1,9 @@
<h1>{__('FindPolls', 'Here are your polls')}</h1>
<ul>
{foreach $polls as $poll}
<li>
<a href="{poll_url id=$poll->admin_id admin=true}">{$poll->title|html}</a>
({__('Generic', 'Creation date:')} {$poll->creation_date|date_format:$date_format['txt_full']})
</li>
{/foreach}
</ul>