phpBB

Code Changes

File: includes/mcp/mcp_warn.php

  Unmodified   Added   Modified   Removed
Line 204Line 204

$sql = 'SELECT u.*, p.*
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u


$sql = 'SELECT u.*, p.*
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . " u

			WHERE post_id = $post_id

			WHERE p.post_id = $post_id

				AND u.user_id = p.poster_id";
$result = $db->sql_query($sql);
$user_row = $db->sql_fetchrow($result);

				AND u.user_id = p.poster_id";
$result = $db->sql_query($sql);
$user_row = $db->sql_fetchrow($result);

Line 247Line 247
		{
$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("&f=$forum_id&p=$post_id");
$this->u_action .= "&f=$forum_id&p=$post_id";

 
		}

// Check if can send a notification
if ($config['allow_privmsg'])
{
$auth2 = new auth();
$auth2->acl($user_row);
$s_can_notify = ($auth2->acl_get('u_readpm')) ? true : false;
unset($auth2);
}
else
{
$s_can_notify = false;
}

// Prevent against clever people
if ($notify && !$s_can_notify)
{
$notify = false;

		}

if ($warning && $action == 'add_warning')

		}

if ($warning && $action == 'add_warning')

Line 289Line 308
			include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}


			include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}


		$rank_title = $rank_img = '';

		get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img, $rank_img_src);

		$avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);

$template->assign_vars(array(

		$avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);

$template->assign_vars(array(

Line 307Line 326
			'RANK_IMG'			=> $rank_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"),

			'RANK_IMG'			=> $rank_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"),

 

'S_CAN_NOTIFY' => $s_can_notify,

		));
}


		));
}


Line 349Line 370
		{
$this->p_master->adjust_url('&u=' . $user_id);
$this->u_action .= "&u=$user_id";

		{
$this->p_master->adjust_url('&u=' . $user_id);
$this->u_action .= "&u=$user_id";

 
		}

// Check if can send a notification
if ($config['allow_privmsg'])
{
$auth2 = new auth();
$auth2->acl($user_row);
$s_can_notify = ($auth2->acl_get('u_readpm')) ? true : false;
unset($auth2);
}
else
{
$s_can_notify = false;
}

// Prevent against clever people
if ($notify && !$s_can_notify)
{
$notify = false;

		}

if ($warning && $action == 'add_warning')

		}

if ($warning && $action == 'add_warning')

Line 373Line 413
			include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}


			include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}


		$rank_title = $rank_img = '';

		get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img, $rank_img_src);

		$avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);

// OK, they didn't submit a warning so lets build the page for them to do so
$template->assign_vars(array(
'U_POST_ACTION' => $this->u_action,


		$avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']);

// OK, they didn't submit a warning so lets build the page for them to do so
$template->assign_vars(array(
'U_POST_ACTION' => $this->u_action,


			'USERNAME'			=> $user_row['username'],
'USER_COLOR' => (!empty($user_row['user_colour'])) ? $user_row['user_colour'] : '',

 
			'RANK_TITLE'		=> $rank_title,
'JOINED' => $user->format_date($user_row['user_regdate']),
'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0,
'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0,

			'RANK_TITLE'		=> $rank_title,
'JOINED' => $user->format_date($user_row['user_regdate']),
'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0,
'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0,

 

'USERNAME_FULL' => get_username_string('full', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
'USERNAME_COLOUR' => get_username_string('colour', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
'USERNAME' => get_username_string('username', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
'U_PROFILE' => get_username_string('profile', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),


'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $rank_img,


'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $rank_img,

 

'S_CAN_NOTIFY' => $s_can_notify,

		));

return $user_id;

		));

return $user_id;