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 | |
| 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
| -rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
| -rw-r--r-- | phpBB/posting.php | 41 |
2 files changed, 42 insertions, 0 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index b0a2937dcf..d72e75b009 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -177,6 +177,7 @@ <li>[Fix] Correctly set attachment flag for topics, posts and pms after deleting attachments (Bug #48265 - Patch by WorldWar and nickvergessen)</li> <li>[Fix] Display "Locked" button instead of "Reply" one for locked forum in viewtopic (prosilver). (Bug #38055 - Patch by Raimon)</li> <li>[Fix] Correctly propagate umlauts over search result pages (Bug #33755)</li> + <li>[Fix] Preserve post options when refusing to save the post as a draft. (Bug #39115)</li> <li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li> <li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li> <li>[Change] Template engine now permits to a limited extent variable includes.</li> 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); } } |
