aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_topic.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2007-09-13 15:15:27 +0000
committerHenry Sudhof <kellanved@phpbb.com>2007-09-13 15:15:27 +0000
commit052025bb1f144337952236c5c4774826818037d4 (patch)
tree3557f8a43c06a3944ed2f0de1b5835a3289d8d09 /phpBB/includes/mcp/mcp_topic.php
parent685282c2cbe8a6d8c7abd77d3801d7242d0ae693 (diff)
downloadforums-052025bb1f144337952236c5c4774826818037d4.tar
forums-052025bb1f144337952236c5c4774826818037d4.tar.gz
forums-052025bb1f144337952236c5c4774826818037d4.tar.bz2
forums-052025bb1f144337952236c5c4774826818037d4.tar.xz
forums-052025bb1f144337952236c5c4774826818037d4.zip
-#14438
-Refactor the confirm table cleanup -Add confirm table cleanup to session garbage collection. Might require own pseudo-cron. git-svn-id: file:///svn/phpbb/trunk@8089 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_topic.php')
-rw-r--r--phpBB/includes/mcp/mcp_topic.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 900faa5adc..4459c8e673 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -34,6 +34,7 @@ function mcp_topic_view($id, $mode, $action)
$icon_id = request_var('icon', 0);
$subject = utf8_normalize_nfc(request_var('subject', '', true));
$start = request_var('start', 0);
+ $sort_days_old = request_var('st_old', 0);
$forum_id = request_var('f', 0);
$to_topic_id = request_var('to_topic_id', 0);
$to_forum_id = request_var('to_forum_id', 0);
@@ -97,13 +98,17 @@ function mcp_topic_view($id, $mode, $action)
if ($total == -1)
{
$total = $topic_info['topic_replies'] + 1;
- }
-
+ }
+
$posts_per_page = max(0, request_var('posts_per_page', intval($config['posts_per_page'])));
if ($posts_per_page == 0)
{
$posts_per_page = $total;
}
+ if (!empty($sort_days_old) && $sort_days_old != $sort_days)
+ {
+ $start = 0;
+ }
$sql = 'SELECT u.username, u.username_clean, u.user_colour, p.*
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
@@ -215,7 +220,7 @@ function mcp_topic_view($id, $mode, $action)
'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_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" : ''),
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=approve_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '',
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=report_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '')
@@ -263,7 +268,11 @@ function mcp_topic_view($id, $mode, $action)
}
}
}
-
+
+ $s_hidden_fields = build_hidden_fields(array(
+ 'st_old' => $sort_days,
+ ));
+
$template->assign_vars(array(
'TOPIC_TITLE' => $topic_info['topic_title'],
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_info['forum_id'] . '&amp;t=' . $topic_info['topic_id']),
@@ -289,6 +298,8 @@ function mcp_topic_view($id, $mode, $action)
'S_REPORT_VIEW' => ($action == 'reports') ? true : false,
'S_MERGE_VIEW' => ($action == 'merge') ? true : false,
'S_SPLIT_VIEW' => ($action == 'split') ? true : false,
+
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
'S_TOPIC_ICON' => $icon_id,