mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 08:47:45 +02:00
[ticket/13454] Remove unused variables
This is part 2 of the pr. PHPBB3-13454
This commit is contained in:
@@ -241,8 +241,6 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
|
||||
foreach ($topic_list as $topic_id)
|
||||
{
|
||||
$topic_title = '';
|
||||
|
||||
$row_ary = &$topic_rows[$topic_id];
|
||||
|
||||
$replies = $phpbb_content_visibility->get_count('topic_posts', $row_ary, $forum_id) - 1;
|
||||
@@ -358,7 +356,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
*/
|
||||
function mcp_resync_topics($topic_ids)
|
||||
{
|
||||
global $auth, $db, $template, $phpEx, $user, $phpbb_root_path, $phpbb_log, $request;
|
||||
global $db, $user, $phpbb_log, $request;
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
@@ -406,7 +404,7 @@ function mcp_resync_topics($topic_ids)
|
||||
*/
|
||||
function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
{
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $auth, $phpbb_log, $request;
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $phpbb_log, $request;
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
|
@@ -262,7 +262,7 @@ class mcp_main
|
||||
*/
|
||||
function lock_unlock($action, $ids)
|
||||
{
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_log, $phpbb_dispatcher;
|
||||
global $user, $db, $request, $phpbb_log, $phpbb_dispatcher;
|
||||
|
||||
if ($action == 'lock' || $action == 'unlock')
|
||||
{
|
||||
@@ -306,7 +306,6 @@ function lock_unlock($action, $ids)
|
||||
'action' => $action,
|
||||
'redirect' => $redirect)
|
||||
);
|
||||
$success_msg = '';
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
@@ -367,7 +366,7 @@ function lock_unlock($action, $ids)
|
||||
*/
|
||||
function change_topic_type($action, $topic_ids)
|
||||
{
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_log;
|
||||
global $user, $db, $request, $phpbb_log;
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
@@ -412,7 +411,6 @@ function change_topic_type($action, $topic_ids)
|
||||
'action' => $action,
|
||||
'redirect' => $redirect,
|
||||
);
|
||||
$success_msg = '';
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
|
@@ -195,7 +195,7 @@ class mcp_queue
|
||||
));
|
||||
}
|
||||
|
||||
$extensions = $attachments = $topic_tracking_info = array();
|
||||
$attachments = $topic_tracking_info = array();
|
||||
|
||||
// Get topic tracking info
|
||||
if ($config['load_db_lastread'])
|
||||
@@ -217,8 +217,6 @@ class mcp_queue
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
{
|
||||
$extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE post_msg_id = ' . $post_id . '
|
||||
@@ -417,7 +415,6 @@ class mcp_queue
|
||||
$sort_by_sql = $sort_order_sql = array();
|
||||
phpbb_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_approved'] : $total;
|
||||
$limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||
|
||||
$forum_names = array();
|
||||
|
@@ -182,7 +182,7 @@ class mcp_reports
|
||||
));
|
||||
}
|
||||
|
||||
$topic_tracking_info = $extensions = $attachments = array();
|
||||
$attachments = array();
|
||||
// Get topic tracking info
|
||||
if ($config['load_db_lastread'])
|
||||
{
|
||||
@@ -351,8 +351,6 @@ class mcp_reports
|
||||
trigger_error('NOT_MODERATOR');
|
||||
}
|
||||
|
||||
$global_id = $forum_list[0];
|
||||
|
||||
$sql = 'SELECT SUM(forum_topics_approved) as sum_forum_topics
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_list);
|
||||
@@ -391,7 +389,6 @@ class mcp_reports
|
||||
$sort_by_sql = $sort_order_sql = array();
|
||||
phpbb_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_approved'] : $total;
|
||||
$limit_time_sql = ($sort_days) ? 'AND r.report_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||
|
||||
if ($mode == 'reports')
|
||||
|
@@ -171,11 +171,9 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$has_unapproved_posts = $has_deleted_posts = false;
|
||||
|
||||
// Grab extensions
|
||||
$extensions = $attachments = array();
|
||||
$attachments = array();
|
||||
if ($topic_info['topic_attachment'] && sizeof($post_id_list))
|
||||
{
|
||||
$extensions = $cache->obtain_attach_extensions($topic_info['forum_id']);
|
||||
|
||||
// Get attachments...
|
||||
if ($auth->acl_get('u_download') && $auth->acl_get('f_download', $topic_info['forum_id']))
|
||||
{
|
||||
@@ -269,8 +267,6 @@ function mcp_topic_view($id, $mode, $action)
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
||||
);
|
||||
|
||||
$current_row_number = $i;
|
||||
|
||||
/**
|
||||
* Event to modify the template data block for topic reviews in the MCP
|
||||
*
|
||||
|
@@ -190,7 +190,7 @@ class mcp_warn
|
||||
function mcp_warn_post_view($action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config, $request;
|
||||
global $template, $db, $user, $auth, $phpbb_dispatcher;
|
||||
global $template, $db, $user, $phpbb_dispatcher;
|
||||
|
||||
$post_id = $request->variable('p', 0);
|
||||
$forum_id = $request->variable('f', 0);
|
||||
@@ -369,8 +369,8 @@ class mcp_warn
|
||||
*/
|
||||
function mcp_warn_user_view($action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config, $module, $request;
|
||||
global $template, $db, $user, $auth, $phpbb_dispatcher;
|
||||
global $phpEx, $phpbb_root_path, $config, $request;
|
||||
global $template, $db, $user, $phpbb_dispatcher;
|
||||
|
||||
$user_id = $request->variable('u', 0);
|
||||
$username = $request->variable('username', '', true);
|
||||
|
Reference in New Issue
Block a user