diff --git a/adminstuds.php b/adminstuds.php index f8501dd..25c5bf8 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -63,7 +63,7 @@ if (!$poll) { if (isset($_POST['update_poll_info'])) { $updated = false; - $field = $inputService->filterAllowedValues($_POST['update_poll_info'], ['title', 'admin_mail', 'comment', 'rules', 'expiration_date', 'name']); + $field = $inputService->filterAllowedValues($_POST['update_poll_info'], ['title', 'admin_mail', 'description', 'rules', 'expiration_date', 'name']); // Update the right poll field if ($field == 'title') { @@ -78,10 +78,10 @@ if (isset($_POST['update_poll_info'])) { $poll->admin_mail = $admin_mail; $updated = true; } - } elseif ($field == 'comment') { - $comment = strip_tags($_POST['comment']); - if ($comment) { - $poll->comment = $comment; + } elseif ($field == 'description') { + $description = strip_tags($_POST['description']); + if ($description) { + $poll->description = $description; $updated = true; } } elseif ($field == 'rules') { diff --git a/app/classes/Framadate/FramaDB.php b/app/classes/Framadate/FramaDB.php index 6b7c4c3..d4a198f 100644 --- a/app/classes/Framadate/FramaDB.php +++ b/app/classes/Framadate/FramaDB.php @@ -90,7 +90,7 @@ class FramaDB { } function updatePoll($poll) { - $prepared = $this->prepare('UPDATE `' . Utils::table('poll') . '` SET title=?, admin_name=?, admin_mail=?, description=?, end_date=FROM_UNIXTIME(?), active=?, editable=? WHERE id = ?'); + $prepared = $this->prepare('UPDATE `' . Utils::table('poll') . '` SET title=?, admin_name=?, admin_mail=?, description=?, end_date=?, active=?, editable=? WHERE id = ?'); return $prepared->execute([$poll->title, $poll->admin_name, $poll->admin_mail, $poll->description, $poll->end_date, $poll->active, $poll->editable, $poll->id]); } diff --git a/tpl/part/poll_info.tpl b/tpl/part/poll_info.tpl index 360e09a..7506087 100644 --- a/tpl/part/poll_info.tpl +++ b/tpl/part/poll_info.tpl @@ -80,8 +80,8 @@ {if $admin && !$expired} {/if}