From 11aff559d4fcde5c2935aa6ebdfcfbe162d91f64 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 3 Feb 2013 23:06:30 +0100 Subject: [PATCH] [feature/avatars] Use deprecated for compatibility function Also moved use of global variables inside the only if statement they are used in. PHPBB3-10018 --- phpBB/includes/functions_compatibility.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php index b0655ff291..2197815087 100644 --- a/phpBB/includes/functions_compatibility.php +++ b/phpBB/includes/functions_compatibility.php @@ -17,8 +17,9 @@ if (!defined('IN_PHPBB')) /** * 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 int $avatar_type Type of 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) { - global $phpbb_root_path, $phpEx; - // map arguments to new function phpbb_get_avatar() $row = array( 'avatar' => $avatar, @@ -42,6 +41,8 @@ function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $ if (!function_exists('phpbb_get_avatar')) { + global $phpbb_root_path, $phpEx; + include($phpbb_root_path . 'includes/functions_display.' . $phpEx); }