1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 12:30:42 +02:00

[feature/avatars] Introduce global phpbb_avatar_manager

PHPBB3-10018
This commit is contained in:
Igor Wiedler
2012-04-08 16:27:09 +02:00
parent e8a9c0ae6d
commit eea2ec5052
6 changed files with 21 additions and 28 deletions

View File

@@ -1313,8 +1313,7 @@ function get_avatar($row, $alt, $ignore_config = false)
{
global $user, $config, $cache, $phpbb_root_path, $phpEx;
global $request;
static $avatar_manager = null;
global $phpbb_avatar_manager;
if (!$config['allow_avatar'] && !$ignore_config)
{
@@ -1368,12 +1367,7 @@ function get_avatar($row, $alt, $ignore_config = false)
break;
default:
if (empty($avatar_manager))
{
$avatar_manager = new phpbb_avatar_manager($phpbb_root_path, $phpEx, $config, $request, $cache->get_driver());
}
$avatar = $avatar_manager->get_driver($row['avatar_type']);
$avatar = $phpbb_avatar_manager->get_driver($row['avatar_type']);
if ($avatar)
{