mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[feature/avatars] Use deprecated for compatibility function
Also moved use of global variables inside the only if statement they are used in. PHPBB3-10018
This commit is contained in:
parent
f322f4eac9
commit
11aff559d4
1 changed files with 5 additions and 4 deletions
|
@ -17,8 +17,9 @@ if (!defined('IN_PHPBB'))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get user avatar
|
* Get user avatar
|
||||||
* Compatibility function added: phpBB 3.1.0-A1
|
*
|
||||||
*
|
* @deprecated 3.1.0-a1 (To be removed: 3.3.0)
|
||||||
|
*
|
||||||
* @param string $avatar Users assigned avatar name
|
* @param string $avatar Users assigned avatar name
|
||||||
* @param int $avatar_type Type of avatar
|
* @param int $avatar_type Type of avatar
|
||||||
* @param string $avatar_width Width of users avatar
|
* @param string $avatar_width Width of users avatar
|
||||||
|
@ -30,8 +31,6 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)
|
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx;
|
|
||||||
|
|
||||||
// map arguments to new function phpbb_get_avatar()
|
// map arguments to new function phpbb_get_avatar()
|
||||||
$row = array(
|
$row = array(
|
||||||
'avatar' => $avatar,
|
'avatar' => $avatar,
|
||||||
|
@ -42,6 +41,8 @@ function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $
|
||||||
|
|
||||||
if (!function_exists('phpbb_get_avatar'))
|
if (!function_exists('phpbb_get_avatar'))
|
||||||
{
|
{
|
||||||
|
global $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue