aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2008-07-28 16:44:02 +0000
committerHenry Sudhof <kellanved@phpbb.com>2008-07-28 16:44:02 +0000
commit2bec47abfe22c4010f73c06633361339431667e9 (patch)
treebffd91b0640e475b9b6942a4ca21ae6718db4d46
parent8f2a42c2d2c2fae3f672236ad2e97f0f8da84601 (diff)
downloadforums-2bec47abfe22c4010f73c06633361339431667e9.tar
forums-2bec47abfe22c4010f73c06633361339431667e9.tar.gz
forums-2bec47abfe22c4010f73c06633361339431667e9.tar.bz2
forums-2bec47abfe22c4010f73c06633361339431667e9.tar.xz
forums-2bec47abfe22c4010f73c06633361339431667e9.zip
#31265
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8702 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/mcp/mcp_topic.php8
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&amp;i=$id&amp;p={$row['post_id']}&amp;mode=post_details" . (($forum_id) ? "&amp;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(