aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_queue.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-05-30 12:24:07 +0000
committerNils Adermann <naderman@naderman.de>2006-05-30 12:24:07 +0000
commitea04b3bcbc12d0eaa6443ab509922495755b1244 (patch)
treea81a045323d6364514812ea54b8d41f1e0613194 /phpBB/includes/mcp/mcp_queue.php
parent74799e168de336d6aaddb43606772282c3319e09 (diff)
downloadforums-ea04b3bcbc12d0eaa6443ab509922495755b1244.tar
forums-ea04b3bcbc12d0eaa6443ab509922495755b1244.tar.gz
forums-ea04b3bcbc12d0eaa6443ab509922495755b1244.tar.bz2
forums-ea04b3bcbc12d0eaa6443ab509922495755b1244.tar.xz
forums-ea04b3bcbc12d0eaa6443ab509922495755b1244.zip
- various corrections related to permissions in the mcp, including [Bug #1994] and [Bug #1924]
- fixed some quickmod bugs [#1994] and [Bug #1898] - browse reports/unapproved posts by topic id - correctly hide approval details - added return message to mcp_ban [Bug #1851] - adjusted some links, including [Bug #1855] - added some missing language variables, including [Bug #1824], [Bug #1841], [Bug #1852] and [Bug #1864] - always show all options in mcp_topic [Bug #1938] git-svn-id: file:///svn/phpbb/trunk@5986 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r--phpBB/includes/mcp/mcp_queue.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 7e8dc6760a..9e7da838b5 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -142,8 +142,22 @@ class mcp_queue
case 'unapproved_topics':
case 'unapproved_posts':
+ $topic_id = request_var('t', 0);
$forum_info = array();
+ if ($topic_id)
+ {
+ $topic_info = get_topic_data(array($topic_id));
+
+ if (!sizeof($topic_info))
+ {
+ trigger_error($user->lang['TOPIC_NOT_EXIST']);
+ }
+
+ $topic_info = $topic_info[$topic_id];
+ $forum_id = $topic_info['forum_id'];
+ }
+
$forum_list_approve = get_forum_list('m_approve', false, true);
if (!$forum_id)
@@ -189,7 +203,7 @@ class mcp_queue
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
$sort_by_sql = $sort_order_sql = array();
- mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_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;
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
@@ -200,7 +214,8 @@ class mcp_queue
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t' . (($sort_order_sql{0} == 'u') ? ', ' . USERS_TABLE . ' u' : '') . "
WHERE p.forum_id IN ($forum_list)
AND p.post_approved = 0
- " . (($sort_order_sql{0} == 'u') ? 'AND u.user_id = p.poster_id' : '') . "
+ " . (($sort_order_sql{0} == 'u') ? 'AND u.user_id = p.poster_id' : '') . '
+ ' . (($topic_id) ? 'AND p.topic_id = ' . $topic_id : '') . "
AND t.topic_id = p.topic_id
AND t.topic_first_post_id <> p.post_id
$limit_time_sql
@@ -295,10 +310,14 @@ class mcp_queue
// Now display the page
$template->assign_vars(array(
'L_DISPLAY_ITEMS' => ($mode == 'unapproved_posts') ? $user->lang['DISPLAY_POSTS'] : $user->lang['DISPLAY_TOPICS'],
+ 'L_ONLY_TOPIC' => ($topic_id) ? sprintf($user->lang['ONLY_TOPIC'], $topic_info['topic_title']) : '',
+
'S_FORUM_OPTIONS' => $forum_options,
+ 'S_MCP_ACTION' => build_url(array('t', 'f', 'sd', 'st', 'sk')),
'PAGINATION' => generate_pagination("{$phpbb_root_path}mcp.$phpEx$SID&amp;i=$id&amp;mode=$mode&amp;f=$forum_id", $total, $config['topics_per_page'], $start),
'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
+ 'TOPIC_ID' => $topic_id,
'TOTAL' => $total)
);