aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_compatibility.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-01-24 00:23:45 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-01-24 00:23:45 +0100
commit869de98f52e636fd5b9f2a9f5b75d665e7009463 (patch)
tree2d2565219bda6cf4f8e0d0733cabfbc39ca1f470 /phpBB/includes/functions_compatibility.php
parente841453d03003ff0f2c932f5936c17739476ef4f (diff)
downloadforums-869de98f52e636fd5b9f2a9f5b75d665e7009463.tar
forums-869de98f52e636fd5b9f2a9f5b75d665e7009463.tar.gz
forums-869de98f52e636fd5b9f2a9f5b75d665e7009463.tar.bz2
forums-869de98f52e636fd5b9f2a9f5b75d665e7009463.tar.xz
forums-869de98f52e636fd5b9f2a9f5b75d665e7009463.zip
[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
Diffstat (limited to 'phpBB/includes/functions_compatibility.php')
-rw-r--r--phpBB/includes/functions_compatibility.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php
index 11ef982a40..4f96e46417 100644
--- a/phpBB/includes/functions_compatibility.php
+++ b/phpBB/includes/functions_compatibility.php
@@ -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);
}