aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2017-06-21 22:22:47 +0700
committerrxu <rxu@mail.ru>2017-06-21 22:22:47 +0700
commit14cea02412c7b4f318c795a9dec4e7becba22a8b (patch)
tree2b04d661b38be030abfa46865668dfbd29146ac8 /phpBB/posting.php
parent7301748a3a1040ebe75243fc61350451aaabc8a5 (diff)
downloadforums-14cea02412c7b4f318c795a9dec4e7becba22a8b.tar
forums-14cea02412c7b4f318c795a9dec4e7becba22a8b.tar.gz
forums-14cea02412c7b4f318c795a9dec4e7becba22a8b.tar.bz2
forums-14cea02412c7b4f318c795a9dec4e7becba22a8b.tar.xz
forums-14cea02412c7b4f318c795a9dec4e7becba22a8b.zip
[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
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php5
1 files changed, 5 insertions, 0 deletions
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'],