Fixed #12, posting about polls reworked

This commit is contained in:
2021-05-10 21:04:46 +02:00
parent f8ea91a7d4
commit 6c93583f32
2 changed files with 25 additions and 11 deletions

View File

@ -32,7 +32,7 @@ if (!empty($_POST['submit'])) {
$duration_total_minutes = $duration_days*60*24 + $duration_hours * 60 + $duration_minutes;
try {
$poll = Poll::create($api, $prompt, $options, $max_options, $duration_total_minutes, $is_anonymous, $is_public);
redirect('post_poll.php?poll_token='.$poll->token.'&id='.$poll->id.'&prompt='.urlencode($prompt));
redirect('post_poll.php?poll_token='.$poll->token.'&id='.$poll->id);
} catch (\Exception $e) {
quit('Something went wrong creating the poll: "' . $e->getMessage() . '"');
}