diff options
author | Chris Smith <toonarmy@phpbb.com> | 2009-07-26 16:16:30 +0000 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2009-07-26 16:16:30 +0000 |
commit | 63f5cff824ed9c210f0adb933c3dd8a8bcfc17be (patch) | |
tree | 8a6d5c68a6ffd96c58383873ba7d37ea18cc3c13 /phpBB/posting.php | |
parent | 68e2102f20fa583dd184cefec19511d61caa5602 (diff) | |
download | forums-63f5cff824ed9c210f0adb933c3dd8a8bcfc17be.tar forums-63f5cff824ed9c210f0adb933c3dd8a8bcfc17be.tar.gz forums-63f5cff824ed9c210f0adb933c3dd8a8bcfc17be.tar.bz2 forums-63f5cff824ed9c210f0adb933c3dd8a8bcfc17be.tar.xz forums-63f5cff824ed9c210f0adb933c3dd8a8bcfc17be.zip |
Preserve post options when refusing to save the post as a draft. #39115
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9859 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index d304168153..919d92b27c 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -545,6 +545,47 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && ( ) ); + $hidden_fields = array( + 'icon_id' => 0, + + 'disable_bbcode' => false, + 'disable_smilies' => false, + 'disable_magic_url' => false, + 'attach_sig' => true, + 'lock_topic' => false, + + 'topic_type' => POST_NORMAL, + 'topic_time_limit' => 0, + + 'poll_title' => '', + 'poll_option_text' => '', + 'poll_max_options' => 1, + 'poll_length' => 0, + 'poll_vote_change' => false, + ); + + foreach ($hidden_fields as $name => $default) + { + if (!isset($_POST[$name])) + { + // Don't include it, if its not available + unset($hidden_fields[$name]); + continue; + } + + if (is_bool($default)) + { + // Use the string representation + $hidden_fields[$name] = request_var($name, ''); + } + else + { + $hidden_fields[$name] = request_var($name, $default); + } + } + + $s_hidden_fields .= build_hidden_fields($hidden_fields); + confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields); } } |