From 14cea02412c7b4f318c795a9dec4e7becba22a8b Mon Sep 17 00:00:00 2001 From: rxu Date: Wed, 21 Jun 2017 22:22:47 +0700 Subject: [PATCH] [ticket/15252] Fix editing a topic with poll by user not permitted to edit poll Basically, decoding the original poll title and options text was missing. PHPBB3-15252 --- phpBB/posting.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/posting.php b/phpBB/posting.php index 0b6b9c5969..df2ef0d13c 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1192,6 +1192,11 @@ if ($submit || $preview || $refresh) { // We have a poll but the editing user is not permitted to create/edit it. // So we just keep the original poll-data. + // Decode the poll title and options text fisrt. + $original_poll_data['poll_title'] = $bbcode_utils->unparse($original_poll_data['poll_title']); + $original_poll_data['poll_option_text'] = $bbcode_utils->unparse($original_poll_data['poll_option_text']); + $original_poll_data['poll_options'] = explode("\n", $original_poll_data['poll_option_text']); + $poll = array_merge($original_poll_data, array( 'enable_bbcode' => $post_data['enable_bbcode'], 'enable_urls' => $post_data['enable_urls'],