diff options
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 56d4022ec8..57a7166933 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -92,6 +92,7 @@ <li>[Feature] Allow limited inheritance for templates sets.</li> <li>[Feature] Allow hard disabling of the template editor.</li> <li>[Fix] Delete avatar files (Bug #29985).</li> + <li>[Fix] Preserve selection in the MCP. (Bug #31265).</li> </ul> <a name="v301"></a><h3>1.ii. Changes since 3.0.1</h3> diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index a468712a25..ae7448436c 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -46,8 +46,9 @@ function mcp_topic_view($id, $mode, $action) $forum_id = request_var('f', 0); $to_topic_id = request_var('to_topic_id', 0); $to_forum_id = request_var('to_forum_id', 0); - $post_id_list = request_var('post_id_list', array(0)); $sort = isset($_POST['sort']) ? true : false; + $submitted_id_list = request_var('post_ids', array(0)); + $checked_ids = $post_id_list = request_var('post_id_list', array(0)); // Split Topic? if ($action == 'split_all' || $action == 'split_beyond') @@ -113,7 +114,7 @@ function mcp_topic_view($id, $mode, $action) { $posts_per_page = $total; } - if (!empty($sort_days_old) && $sort_days_old != $sort_days) + if ((!empty($sort_days_old) && $sort_days_old != $sort_days) || $total <= $posts_per_page) { $start = 0; } @@ -226,7 +227,7 @@ function mcp_topic_view($id, $mode, $action) 'S_POST_REPORTED' => ($row['post_reported']) ? true : false, 'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true, - 'S_CHECKED' => ($post_id_list && in_array(intval($row['post_id']), $post_id_list)) ? true : false, + 'S_CHECKED' => (!$submitted_id_list || !in_array(intval($row['post_id']), $submitted_id_list) || in_array(intval($row['post_id']), $checked_ids)) ? true : false, 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false, 'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details" . (($forum_id) ? "&f=$forum_id" : ''), @@ -279,6 +280,7 @@ function mcp_topic_view($id, $mode, $action) $s_hidden_fields = build_hidden_fields(array( 'st_old' => $sort_days, + 'post_ids' => $post_id_list, )); $template->assign_vars(array( |