From: Chris S. <too...@ph...> - 2009-07-26 16:16:47
|
Author: toonarmy Date: Sun Jul 26 17:16:30 2009 New Revision: 9859 Log: Preserve post options when refusing to save the post as a draft. #39115 Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html branches/phpBB-3_0_0/phpBB/posting.php Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Sun Jul 26 17:16:30 2009 *************** *** 177,182 **** --- 177,183 ---- <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> Modified: branches/phpBB-3_0_0/phpBB/posting.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/posting.php (original) --- branches/phpBB-3_0_0/phpBB/posting.php Sun Jul 26 17:16:30 2009 *************** *** 545,550 **** --- 545,591 ---- ) ); + $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); } } |