aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_compatibility.php
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-03-04 13:33:42 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-03-04 13:33:42 -0600
commit941b7287b7dd3477d5ebce8d15a83cdde49e9dd7 (patch)
treec8a8873e9419a25e03f70802cac00742ae4f1fd0 /phpBB/includes/functions_compatibility.php
parent029f096411f620f2066608cd0a1e8711f88da9e1 (diff)
parent2e2ddd7e85034f747d5dd312803aadfc47ac80e2 (diff)
downloadforums-941b7287b7dd3477d5ebce8d15a83cdde49e9dd7.tar
forums-941b7287b7dd3477d5ebce8d15a83cdde49e9dd7.tar.gz
forums-941b7287b7dd3477d5ebce8d15a83cdde49e9dd7.tar.bz2
forums-941b7287b7dd3477d5ebce8d15a83cdde49e9dd7.tar.xz
forums-941b7287b7dd3477d5ebce8d15a83cdde49e9dd7.zip
Merge remote-tracking branch 'remotes/marc/feature/avatars' into develop
# By Marc Alexander (100) and others # Via Marc Alexander (8) and Igor Wiedler (3) * remotes/marc/feature/avatars: (138 commits) [feature/avatars] Update module_auth of ucp module and fix small issues [feature/avatars] Add migrations data file for avatars [feature/avatars] Reduce module auth of ucp avatar settings [feature/avatars] Auto-clear avatar dimensions when first changing avatars [feature/avatars] Use "Main" as category for avatars in root of gallery [feature/avatars] Remove trailing whitespace from avatar code [feature/avatars] Pass phpbb_user to prepare and process form functions [feature/avatars] Document the use of the allowed extensions array [feature/avatars] Use array for allowed extensions and implode if needed [feature/avatars] Use deprecated for compatibility function [feature/avatars] Correct license, copyright and package info [feature/avatars] Move list of supported formats to avatar driver class [feature/avatars] Add include of functions_display.php in BC function [feature/avatars] Add note about when compatibility function was added [feature/avatars] Add compatibility function for get_user_avatar() [feature/avatars] Move definition of driver_collection to avatars.yml [feature/avatars] Remove the obsolete request argument for avatar drivers [feature/avatars] Add missing @var to docblocks in avatar manager [feature/avatars] Remove not needed inline style [feature/avatars] Differentiate tests for get drivers functions ...
Diffstat (limited to 'phpBB/includes/functions_compatibility.php')
-rw-r--r--phpBB/includes/functions_compatibility.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php
new file mode 100644
index 0000000000..2197815087
--- /dev/null
+++ b/phpBB/includes/functions_compatibility.php
@@ -0,0 +1,50 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Get user avatar
+*
+* @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
+* @param string $avatar_height Height of users avatar
+* @param string $alt Optional language string for alt tag within image, can be a language key or text
+* @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
+*
+* @return string Avatar image
+*/
+function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)
+{
+ // map arguments to new function phpbb_get_avatar()
+ $row = array(
+ 'avatar' => $avatar,
+ 'avatar_type' => $avatar_type,
+ 'avatar_width' => $avatar_width,
+ 'avatar_height' => $avatar_height,
+ );
+
+ if (!function_exists('phpbb_get_avatar'))
+ {
+ global $phpbb_root_path, $phpEx;
+
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+
+ return phpbb_get_avatar($row, $alt, $ignore_config);
+}