phpBB

Code Changes

File: includes/mcp/mcp_warn.php

  Unmodified   Added   Modified   Removed
Line 41Line 41

if (is_array($action))
{


if (is_array($action))
{

			list($action, ) = each($action);

			$action = key($action);

		}

$this->page_title = 'MCP_WARN';

		}

$this->page_title = 'MCP_WARN';

Line 238Line 238

$user_id = $user_row['user_id'];



$user_id = $user_row['user_id'];


		if (strpos($this->u_action, "&f=$forum_id&p=$post_id") === false)

		if (strpos($this->u_action, "&p=$post_id") === false)

		{

		{

			$this->p_master->adjust_url("&f=$forum_id&p=$post_id");
$this->u_action .= "&f=$forum_id&p=$post_id";

			$this->p_master->adjust_url("&p=$post_id");
$this->u_action .= "&p=$post_id";

		}

// Check if can send a notification

		}

// Check if can send a notification

Line 358Line 358
			'AVATAR_IMG'		=> $avatar_img,
'RANK_IMG' => $user_rank_data['img'],


			'AVATAR_IMG'		=> $avatar_img,
'RANK_IMG' => $user_rank_data['img'],


			'L_WARNING_POST_DEFAULT'	=> sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&p=$post_id#p$post_id"),

			'L_WARNING_POST_DEFAULT'	=> sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?p=$post_id#p$post_id"),


'S_CAN_NOTIFY' => $s_can_notify,
));


'S_CAN_NOTIFY' => $s_can_notify,
));

Line 386Line 386
		$user_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);


		$user_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);


		if (!$user_row)

		if (!$user_row || (int) $user_row['user_id'] === ANONYMOUS)

		{
trigger_error('NO_USER');
}

		{
trigger_error('NO_USER');
}

Line 572Line 572
		submit_pm('post', $warn_pm_subject, $pm_data, false);
}


		submit_pm('post', $warn_pm_subject, $pm_data, false);
}


	$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_WARNING', false, array($user_row['username']));
$log_id = $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_WARNING_BODY', false, array(


	$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_WARNING', false, [$user_row['username']]);

$log_id = $phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_WARNING_BODY', false, [

		'reportee_id' => $user_row['user_id'],

		'reportee_id' => $user_row['user_id'],

		$warning
));

		utf8_encode_ucr($warning)
]);


$sql_ary = array(
'user_id' => $user_row['user_id'],


$sql_ary = array(
'user_id' => $user_row['user_id'],

Line 602Line 603
	$db->sql_freeresult($result);

$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_USER_WARNING', false, array(

	$db->sql_freeresult($result);

$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_USER_WARNING', false, array(

		'forum_id' => $row['forum_id'],
'topic_id' => $row['topic_id'],

		'forum_id' => $row['forum_id'] ?? 0,
'topic_id' => $row['topic_id'] ?? 0,

		'post_id'  => $post_id,
$user_row['username']
));

		'post_id'  => $post_id,
$user_row['username']
));