- don't show too old reports/queue entries

git-svn-id: file:///svn/phpbb/trunk@5752 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2006-03-28 18:59:00 +00:00
parent a22c4b96bf
commit 112a0e8761
2 changed files with 4 additions and 1 deletions

View file

@ -198,6 +198,7 @@ class mcp_queue
" . (($sort_order_sql{0} == 'u') ? 'AND u.user_id = p.poster_id' : '') . " " . (($sort_order_sql{0} == 'u') ? 'AND u.user_id = p.poster_id' : '') . "
AND t.topic_id = p.topic_id AND t.topic_id = p.topic_id
AND t.topic_first_post_id <> p.post_id AND t.topic_first_post_id <> p.post_id
$limit_time_sql
ORDER BY $sort_order_sql"; ORDER BY $sort_order_sql";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
@ -244,6 +245,7 @@ class mcp_queue
WHERE t.topic_approved = 0 WHERE t.topic_approved = 0
AND t.forum_id IN ($forum_list) AND t.forum_id IN ($forum_list)
AND f.forum_id = t.forum_id AND f.forum_id = t.forum_id
$limit_time_sql
ORDER BY $sort_order_sql"; ORDER BY $sort_order_sql";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);

View file

@ -215,7 +215,7 @@ class mcp_reports
$sort_days = $total = 0; $sort_days = $total = 0;
$sort_key = $sort_dir = ''; $sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array(); $sort_by_sql = $sort_order_sql = array();
mcp_sorting('reports', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id); mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id);
$forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total; $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total;
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : ''; $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
@ -238,6 +238,7 @@ class mcp_reports
" . (($sort_order_sql[0] == 'r') ? 'AND ru.user_id = p.poster_id' : '') . " " . (($sort_order_sql[0] == 'r') ? 'AND ru.user_id = p.poster_id' : '') . "
" . (($topic_id) ? "AND p.topic_id = $topic_id" : '') . " " . (($topic_id) ? "AND p.topic_id = $topic_id" : '') . "
AND t.topic_id = p.topic_id AND t.topic_id = p.topic_id
$limit_time_sql
ORDER BY $sort_order_sql"; ORDER BY $sort_order_sql";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);