phpBB

Code Changes

File: includes/mcp/mcp_reports.php

  Unmodified   Added   Modified   Removed
Line 28Line 28
	var $p_master;
var $u_action;


	var $p_master;
var $u_action;


	function mcp_reports(&$p_master)

	function __construct($p_master)

	{

	{

		$this->p_master = &$p_master;

		$this->p_master = $p_master;

	}

function main($id, $mode)

	}

function main($id, $mode)

Line 242Line 242
					}
}


					}
}


				$template->assign_vars(array(








				// parse signature
$parse_flags = ($post_info['user_sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES;
$post_info['user_sig'] = generate_text_for_display($post_info['user_sig'], $post_info['user_sig_bbcode_uid'], $post_info['user_sig_bbcode_bitfield'], $parse_flags, true);

$topic_id = (int) $post_info['topic_id'];

// So it can be sent through the event below.
$report_template = array(

					'S_MCP_REPORT'			=> true,
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),

					'S_MCP_REPORT'			=> true,
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']),

Line 291Line 298
					'POST_IP'				=> $post_info['poster_ip'],
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && $request->variable('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
'POST_ID' => $post_info['post_id'],

					'POST_IP'				=> $post_info['poster_ip'],
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && $request->variable('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
'POST_ID' => $post_info['post_id'],

 
					'SIGNATURE'				=> $post_info['user_sig'],


'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '',


'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? $this->u_action . '&r=' . $report_id . '&p=' . $post_id . '&f=' . $forum_id . '&lookup=' . $post_info['poster_ip'] . '#ip' : '',

				));



























				);

/**
* Event to add/modify MCP report details template data.
*
* @event core.mcp_report_template_data
* @var int forum_id The forum_id, the number in the f GET parameter
* @var int topic_id The topic_id of the report being viewed
* @var int post_id The post_id of the report being viewed (if 0, it is meaningless)
* @var int report_id The report_id of the report being viewed
* @var array report Array with the report data
* @var array report_template Array with the report template data
* @var array post_info Array with the reported post data
* @since 3.2.5-RC1
*/
$vars = array(
'forum_id',
'topic_id',
'post_id',
'report_id',
'report',
'report_template',
'post_info',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_report_template_data', compact($vars)));

$template->assign_vars($report_template);


$this->tpl_name = 'mcp_post';



$this->tpl_name = 'mcp_post';


Line 302Line 336
			case 'reports':
case 'reports_closed':
$topic_id = $request->variable('t', 0);

			case 'reports':
case 'reports_closed':
$topic_id = $request->variable('t', 0);

 

if ($request->is_set_post('t'))
{
$topic_id = $request->variable('t', 0, false, \phpbb\request\request_interface::POST);
}


$forum_info = array();
$forum_list_reports = get_forum_list('m_report', false, true);


$forum_info = array();
$forum_list_reports = get_forum_list('m_report', false, true);

Line 378Line 417
				$forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';
foreach ($forum_list_reports as $row)
{

				$forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';
foreach ($forum_list_reports as $row)
{

					$forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . str_repeat('&nbsp; &nbsp;', $row['padding']) . $row['forum_name'] . '</option>';

					$forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . str_repeat('&nbsp; &nbsp;', $row['padding']) . truncate_string($row['forum_name'], 30, 255, false, $user->lang('ELLIPSIS')) . '</option>';

					$forum_data[$row['forum_id']] = $row;
}
unset($forum_list_reports);

					$forum_data[$row['forum_id']] = $row;
}
unset($forum_list_reports);