aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2017-06-24 21:31:39 +0200
committerMarc Alexander <admin@m-a-styles.de>2017-06-24 21:31:39 +0200
commit909976f0761622fd0b6ecd00bef4919513c738df (patch)
tree2b04d661b38be030abfa46865668dfbd29146ac8
parent7301748a3a1040ebe75243fc61350451aaabc8a5 (diff)
parent14cea02412c7b4f318c795a9dec4e7becba22a8b (diff)
downloadforums-909976f0761622fd0b6ecd00bef4919513c738df.tar
forums-909976f0761622fd0b6ecd00bef4919513c738df.tar.gz
forums-909976f0761622fd0b6ecd00bef4919513c738df.tar.bz2
forums-909976f0761622fd0b6ecd00bef4919513c738df.tar.xz
forums-909976f0761622fd0b6ecd00bef4919513c738df.zip
Merge pull request #4856 from rxu/ticket/15252
[ticket/15252] Fix editing a topic with poll by user not permitted to edit poll
-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'],