mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
- 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
This commit is contained in:
@@ -858,7 +858,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
|
||||
'U_POST_ID' => $row['post_id'],
|
||||
'U_MINI_POST' => "{$phpbb_root_path}viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#p' . $row['post_id'],
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&mode=post_details&p=" . $row['post_id'] : '',
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=main&mode=post_details&p=" . $row['post_id'] : '',
|
||||
'U_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? 'javascript:addquote(' . $row['post_id'] . ", '" . addslashes($poster) . "')" : '')
|
||||
);
|
||||
unset($rowset[$i]);
|
||||
|
@@ -20,7 +20,7 @@ class mcp_logs_info
|
||||
'title' => 'MCP_LOGS',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'front' => array('title' => 'MCP_LOGS_FRONT', 'auth' => '', 'cat' => array('MCP_LOGS')),
|
||||
'front' => array('title' => 'MCP_LOGS_FRONT', 'auth' => 'acl_m_ || aclf_m_', 'cat' => array('MCP_LOGS')),
|
||||
'forum_logs' => array('title' => 'MCP_LOGS_FORUM_VIEW', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_LOGS')),
|
||||
'topic_logs' => array('title' => 'MCP_LOGS_TOPIC_VIEW', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_LOGS')),
|
||||
),
|
||||
|
@@ -20,7 +20,7 @@ class mcp_main_info
|
||||
'title' => 'MCP_MAIN',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'front' => array('title' => 'MCP_MAIN_FRONT', 'auth' => 'acl_m_', 'cat' => array('MCP_MAIN')),
|
||||
'front' => array('title' => 'MCP_MAIN_FRONT', 'auth' => '', 'cat' => array('MCP_MAIN')),
|
||||
'forum_view' => array('title' => 'MCP_MAIN_FORUM_VIEW', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_MAIN')),
|
||||
'topic_view' => array('title' => 'MCP_MAIN_TOPIC_VIEW', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_MAIN')),
|
||||
'post_details' => array('title' => 'MCP_MAIN_POST_DETAILS', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_MAIN')),
|
||||
|
@@ -20,9 +20,9 @@ class mcp_queue_info
|
||||
'title' => 'MCP_QUEUE',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'unapproved_topics' => array('title' => 'MCP_QUEUE_UNAPPROVED_TOPICS', 'auth' => 'acl_m_approve || aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'unapproved_posts' => array('title' => 'MCP_QUEUE_UNAPPROVED_POSTS', 'auth' => 'acl_m_approve || aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'approve_details' => array('title' => 'MCP_QUEUE_APPROVE_DETAILS', 'auth' => 'acl_m_approve || aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'unapproved_topics' => array('title' => 'MCP_QUEUE_UNAPPROVED_TOPICS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'unapproved_posts' => array('title' => 'MCP_QUEUE_UNAPPROVED_POSTS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
'approve_details' => array('title' => 'MCP_QUEUE_APPROVE_DETAILS', 'auth' => 'aclf_m_approve', 'cat' => array('MCP_QUEUE')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@@ -20,9 +20,9 @@ class mcp_reports_info
|
||||
'title' => 'MCP_REPORTS',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'reports' => array('title' => 'MCP_REPORTS_OPEN', 'auth' => 'acl_m_report ||aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'reports_closed' => array('title' => 'MCP_REPORTS_CLOSED', 'auth' => 'acl_m_report || aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'report_details' => array('title' => 'MCP_REPORT_DETAILS', 'auth' => 'acl_m_report || aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'reports' => array('title' => 'MCP_REPORTS_OPEN', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'reports_closed' => array('title' => 'MCP_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'report_details' => array('title' => 'MCP_REPORT_DETAILS', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@@ -20,10 +20,10 @@ class mcp_warn_info
|
||||
'title' => 'MCP_WARN',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'front' => array('title' => 'MCP_WARN_FRONT', 'auth' => '', 'cat' => array('MCP_WARN')),
|
||||
'list' => array('title' => 'MCP_WARN_LIST', 'auth' => '', 'cat' => array('MCP_WARN')),
|
||||
'warn_user' => array('title' => 'MCP_WARN_USER', 'auth' => '', 'cat' => array('MCP_WARN')),
|
||||
'warn_post' => array('title' => 'MCP_WARN_POST', 'auth' => 'acl_m_,$id', 'cat' => array('MCP_WARN')),
|
||||
'front' => array('title' => 'MCP_WARN_FRONT', 'auth' => 'aclf_m_warn', 'cat' => array('MCP_WARN')),
|
||||
'list' => array('title' => 'MCP_WARN_LIST', 'auth' => 'aclf_m_warn', 'cat' => array('MCP_WARN')),
|
||||
'warn_user' => array('title' => 'MCP_WARN_USER', 'auth' => 'acl_m_warn', 'cat' => array('MCP_WARN')),
|
||||
'warn_post' => array('title' => 'MCP_WARN_POST', 'auth' => 'acl_m_warn,$id', 'cat' => array('MCP_WARN')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ class mcp_ban
|
||||
|
||||
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL']);
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">« ' . $user->lang['BACK_TO_PREV'] . '</a>');
|
||||
}
|
||||
else if ($unbansubmit)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ class mcp_ban
|
||||
|
||||
user_unban($mode, $ban);
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL']);
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">« ' . $user->lang['BACK_TO_PREV'] . '</a>');
|
||||
}
|
||||
|
||||
// Ban length options
|
||||
|
@@ -210,7 +210,7 @@ function lock_unlock($action, $ids)
|
||||
$l_prefix = 'POST';
|
||||
}
|
||||
|
||||
if (!($forum_id = check_ids($ids, $table, $sql_id, 'm_lock')))
|
||||
if (!($forum_id = check_ids($ids, $table, $sql_id, array('f_user_lock', 'm_lock'))))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -266,7 +266,7 @@ function change_topic_type($action, $topic_ids)
|
||||
{
|
||||
global $auth, $user, $db, $SID, $phpEx, $phpbb_root_path;
|
||||
|
||||
if (!($forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', 'm_')))
|
||||
if (!($forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('f_announce', 'f_sticky', 'm_'))))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@@ -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&i=$id&mode=$mode&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)
|
||||
);
|
||||
|
||||
|
@@ -239,9 +239,9 @@ class mcp_reports
|
||||
WHERE p.forum_id IN ($forum_list)
|
||||
$report_state
|
||||
AND r.post_id = p.post_id
|
||||
" . (($sort_order_sql[0] == 'u') ? 'AND u.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" : '') . "
|
||||
" . (($sort_order_sql[0] == 'u') ? 'AND u.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 : '') . "
|
||||
AND t.topic_id = p.topic_id
|
||||
$limit_time_sql
|
||||
ORDER BY $sort_order_sql";
|
||||
@@ -291,7 +291,9 @@ class mcp_reports
|
||||
|
||||
$template->assign_block_vars('postrow', array(
|
||||
'U_VIEWFORUM' => "{$phpbb_root_path}viewforum.$phpEx$SID&f=" . $row['forum_id'],
|
||||
'U_VIEWTOPIC' => "{$phpbb_root_path}viewtopic.$phpEx$SID&f=" . $row['forum_id'] . '&t=' . $row['topic_id'],
|
||||
// Q: Why accessing the topic by a post_id instead of its topic_id?
|
||||
// A: To prevent the post from being hidden because of wrong encoding or different charset
|
||||
'U_VIEWTOPIC' => "{$phpbb_root_path}viewtopic.$phpEx$SID&f=" . $row['forum_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id'],
|
||||
'U_VIEW_DETAILS' => "{$phpbb_root_path}mcp.$phpEx$SID&i=reports&start=$start&mode=report_details&f={$forum_id}&p={$row['post_id']}",
|
||||
'U_VIEW_POSTER_PROFILE' => ($row['poster_id'] != ANONYMOUS) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['poster_id']}" : '',
|
||||
'U_VIEW_REPORTER_PROFILE' => ($row['reporter_id'] != ANONYMOUS) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['reporter_id']}" : '',
|
||||
@@ -312,12 +314,16 @@ class mcp_reports
|
||||
|
||||
// Now display the page
|
||||
$template->assign_vars(array(
|
||||
'L_ONLY_TOPIC' => ($topic_id) ? sprintf($user->lang['ONLY_TOPIC'], $topic_info['topic_title']) : '',
|
||||
|
||||
'S_MCP_ACTION' => build_url(array('t', 'f', 'sd', 'st', 'sk')),
|
||||
'S_FORUM_OPTIONS' => $forum_options,
|
||||
'S_CLOSED' => ($mode == 'reports_closed') ? true : false,
|
||||
|
||||
'PAGINATION' => generate_pagination("{$phpbb_root_path}mcp.$phpEx$SID&i=$id&mode=$mode&f=$forum_id&t=$topic_id", $total, $config['topics_per_page'], $start),
|
||||
'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
|
||||
'TOTAL' => $total,
|
||||
'S_MCP_ACTION' => "{$phpbb_root_path}mcp.$phpEx$SID&i=$id&mode=$mode&t=0",
|
||||
'S_FORUM_OPTIONS' => $forum_options,
|
||||
'S_CLOSED' => ($mode == 'reports_closed') ? true : false)
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'TOTAL' => $total)
|
||||
);
|
||||
|
||||
$this->tpl_name = 'mcp_reports';
|
||||
|
@@ -119,7 +119,7 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
|
||||
$checked = ($post_id_list && in_array(intval($row['post_id']), $post_id_list)) ? 'checked="checked" ' : '';
|
||||
$s_checkbox = ($row['post_id'] == $topic_info['topic_first_post_id'] && $action == 'split') ? ' ' : '<input type="checkbox" name="post_id_list[]" value="' . $row['post_id'] . '" ' . $checked . '/>';
|
||||
$s_checkbox = '<input type="checkbox" name="post_id_list[]" value="' . $row['post_id'] . '" ' . $checked . '/>';
|
||||
|
||||
if (!$row['post_approved'])
|
||||
{
|
||||
@@ -141,7 +141,8 @@ function mcp_topic_view($id, $mode, $action)
|
||||
'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true,
|
||||
|
||||
'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details",
|
||||
'U_MCP_APPROVE' => "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&mode=unapproved_posts&action=approve&post_id_list[]=" . $row['post_id'])
|
||||
'U_MCP_APPROVE' => "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&mode=unapproved_posts&action=approve&post_id_list[]=" . $row['post_id'],
|
||||
'U_MCP_REPORT' => "{$phpbb_root_path}mcp.$phpEx$SID&i=reports&mode=report_details&p=" . $row['post_id'])
|
||||
);
|
||||
|
||||
unset($rowset[$i]);
|
||||
@@ -185,15 +186,15 @@ function mcp_topic_view($id, $mode, $action)
|
||||
|
||||
'SPLIT_SUBJECT' => $subject,
|
||||
'POSTS_PER_PAGE' => $posts_per_page,
|
||||
'MODE' => $mode,
|
||||
'ACTION' => $action,
|
||||
|
||||
'REPORTED_IMG' => $user->img('icon_reported', 'POST_REPORTED', false, true),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_unapproved', 'POST_UNAPPROVED', false, true),
|
||||
|
||||
'S_MCP_ACTION' => "$url&i=$id&mode=$mode&action=$action&start=$start",
|
||||
'S_FORUM_SELECT' => '<select name="to_forum_id">' . (($to_forum_id) ? make_forum_select($to_forum_id) : make_forum_select($topic_info['forum_id'])) . '</select>',
|
||||
'S_CAN_SPLIT' => ($auth->acl_get('m_split', $topic_info['forum_id']) && $action != 'merge') ? true : false,
|
||||
'S_CAN_MERGE' => ($auth->acl_get('m_merge', $topic_info['forum_id']) && $action != 'split') ? true : false,
|
||||
'S_CAN_SPLIT' => ($auth->acl_get('m_split', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_MERGE' => ($auth->acl_get('m_merge', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_DELETE' => ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
|
||||
@@ -225,7 +226,8 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
|
||||
|
||||
if (!sizeof($post_id_list))
|
||||
{
|
||||
trigger_error('NO_POST_SELECTED');
|
||||
$template->assign_var('MESSAGE', $user->lang['NO_POST_SELECTED']);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!($forum_id = check_ids($post_id_list, POSTS_TABLE, 'post_id', 'm_split')))
|
||||
|
Reference in New Issue
Block a user