mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #4840 from rmcgirr83/ticket_15237
[ticket/15237] Fix unguarded includes to functions_user
This commit is contained in:
commit
05a8baffdb
5 changed files with 20 additions and 5 deletions
|
@ -28,7 +28,10 @@ class mcp_ban
|
||||||
global $db, $user, $auth, $template, $request, $phpbb_dispatcher;
|
global $db, $user, $auth, $template, $request, $phpbb_dispatcher;
|
||||||
global $phpbb_root_path, $phpEx;
|
global $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
|
if (!function_exists('user_ban'))
|
||||||
|
{
|
||||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||||
|
}
|
||||||
|
|
||||||
// Include the admin banning interface...
|
// Include the admin banning interface...
|
||||||
include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx);
|
include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx);
|
||||||
|
|
|
@ -53,7 +53,10 @@ function mcp_post_details($id, $mode, $action)
|
||||||
if ($auth->acl_get('m_info', $post_info['forum_id']))
|
if ($auth->acl_get('m_info', $post_info['forum_id']))
|
||||||
{
|
{
|
||||||
$ip = request_var('ip', '');
|
$ip = request_var('ip', '');
|
||||||
|
if (!function_exists('user_ipwhois'))
|
||||||
|
{
|
||||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||||
|
}
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&p=$post_id") . '">', '</a>'),
|
'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&p=$post_id") . '">', '</a>'),
|
||||||
|
|
|
@ -101,7 +101,10 @@ switch ($mode)
|
||||||
{
|
{
|
||||||
case 'team':
|
case 'team':
|
||||||
// Display a listing of board admins, moderators
|
// Display a listing of board admins, moderators
|
||||||
|
if (!function_exists('user_get_id_name'))
|
||||||
|
{
|
||||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||||
|
}
|
||||||
|
|
||||||
$page_title = $user->lang['THE_TEAM'];
|
$page_title = $user->lang['THE_TEAM'];
|
||||||
$template_html = 'memberlist_team.html';
|
$template_html = 'memberlist_team.html';
|
||||||
|
|
|
@ -1065,8 +1065,11 @@ if ($submit || $preview || $refresh)
|
||||||
|
|
||||||
// Validate username
|
// Validate username
|
||||||
if (($post_data['username'] && !$user->data['is_registered']) || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS && $post_data['username'] && $post_data['post_username'] && $post_data['post_username'] != $post_data['username']))
|
if (($post_data['username'] && !$user->data['is_registered']) || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS && $post_data['username'] && $post_data['post_username'] && $post_data['post_username'] != $post_data['username']))
|
||||||
|
{
|
||||||
|
if (!function_exists('validate_username'))
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||||
|
}
|
||||||
|
|
||||||
$user->add_lang('ucp');
|
$user->add_lang('ucp');
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,11 @@ $order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC
|
||||||
|
|
||||||
// Whois requested
|
// Whois requested
|
||||||
if ($mode == 'whois' && $auth->acl_get('a_') && $session_id)
|
if ($mode == 'whois' && $auth->acl_get('a_') && $session_id)
|
||||||
|
{
|
||||||
|
if (!function_exists('user_get_id_name'))
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||||
|
}
|
||||||
|
|
||||||
$sql = 'SELECT u.user_id, u.username, u.user_type, s.session_ip
|
$sql = 'SELECT u.user_id, u.username, u.user_type, s.session_ip
|
||||||
FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . " s
|
FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . " s
|
||||||
|
|
Loading…
Add table
Reference in a new issue