Merge branch 'master' into develop

This commit is contained in:
Olivier Perez 2015-10-29 09:42:30 +01:00
commit 1ba245258a
3 changed files with 22 additions and 3 deletions

View file

@ -53,12 +53,13 @@ $notificationService = new NotificationService($mailService);
if (!empty($_GET['poll'])) {
$admin_poll_id = filter_input(INPUT_GET, 'poll', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => POLL_REGEX]]);
if (strlen($admin_poll_id) === 24) {
$poll_id = substr($admin_poll_id, 0, 16);
$poll = $pollService->findById($poll_id);
$poll = $pollService->findByAdminId($admin_poll_id);
}
}
if (!$poll) {
if ($poll) {
$poll_id = $poll->id;
} else {
$smarty->assign('error', __('Error', 'This poll doesn\'t exist !'));
$smarty->display('error.tpl');
exit;