mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 15:16:16 +02:00
[feature/avatars] Add include of functions_display.php in BC function
The needed function phpbb_get_avatar() is defined in includes/functions_display.php. Include that file in the backwards compatible function get_user_avatar(). PHPBB3-10018
This commit is contained in:
parent
e841453d03
commit
869de98f52
@ -17,7 +17,7 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
/**
|
||||
* Get user avatar
|
||||
* Added in phpBB 3.1.0-A1
|
||||
* Compatibility function added: phpBB 3.1.0-A1
|
||||
*
|
||||
* @param string $avatar Users assigned avatar name
|
||||
* @param int $avatar_type Type of avatar
|
||||
@ -30,6 +30,8 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
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()
|
||||
$row = array(
|
||||
'avatar' => $avatar,
|
||||
@ -38,5 +40,10 @@ function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $
|
||||
'avatar_height' => $avatar_height,
|
||||
);
|
||||
|
||||
if (!function_exists('phpbb_get_avatar'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
}
|
||||
|
||||
return phpbb_get_avatar($row, $alt, $ignore_config);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user