[ticket/9758] Removed useless if-conditions to include functions.php

PHPBB3-9758
This commit is contained in:
Crizzo 2014-03-15 15:18:04 +01:00
parent e149c266ce
commit 0d4968f735
7 changed files with 1 additions and 34 deletions

View file

@ -39,13 +39,6 @@ function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $
'avatar_height' => $avatar_height,
);
if (!function_exists('phpbb_get_avatar'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/functions.' . $phpEx);
}
return phpbb_get_avatar($row, $alt, $ignore_config);
}

View file

@ -174,10 +174,6 @@ class mcp_notes
}
// Generate the appropriate user information for the user we are looking at
if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions.' . $phpEx);
}
$rank_title = $rank_img = '';
$avatar_img = phpbb_get_user_avatar($userrow);

View file

@ -398,10 +398,6 @@ class mcp_warn
}
// Generate the appropriate user information for the user we are looking at
if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions.' . $phpEx);
}
get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img, $rank_img_src);
$avatar_img = phpbb_get_user_avatar($user_row);

View file

@ -338,11 +338,6 @@ function get_user_information($user_id, $user_row)
}
}
if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions.' . $phpEx);
}
$user_row['avatar'] = ($user->optionget('viewavatars')) ? phpbb_get_user_avatar($user_row) : '';
get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);

View file

@ -515,10 +515,6 @@ class ucp_profile
break;
case 'avatar':
if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions.' . $phpEx);
}
add_form_key('ucp_avatar');

View file

@ -548,11 +548,6 @@ switch ($mode)
$member['user_sig'] = generate_text_for_display($member['user_sig'], $member['user_sig_bbcode_uid'], $member['user_sig_bbcode_bitfield'], $parse_flags, true);
}
if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions.' . $phpEx);
}
$poster_avatar = phpbb_get_user_avatar($member);
// We need to check if the modules 'zebra' ('friends' & 'foes' mode), 'notes' ('user_notes' mode) and 'warn' ('warn_user' mode) are accessible to decide if we can display appropriate links

View file

@ -16,10 +16,6 @@ $phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
if (!function_exists('phpbb_get_user_avatar'))
{
include($phpbb_root_path . 'includes/functions.' . $phpEx);
}
// Start session management
$user->session_begin();