diff options
author | Igor Wiedler <igor@wiedler.ch> | 2012-04-08 16:27:09 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-04-08 16:27:09 +0200 |
commit | eea2ec50521e274b928d23f710108f37797cb22c (patch) | |
tree | 50659ff5ec46e6a8282103c6af91f587b28e7838 /phpBB/includes/functions_display.php | |
parent | e8a9c0ae6d92822699de9a2d7fc1aae9377ade8a (diff) | |
download | forums-eea2ec50521e274b928d23f710108f37797cb22c.tar forums-eea2ec50521e274b928d23f710108f37797cb22c.tar.gz forums-eea2ec50521e274b928d23f710108f37797cb22c.tar.bz2 forums-eea2ec50521e274b928d23f710108f37797cb22c.tar.xz forums-eea2ec50521e274b928d23f710108f37797cb22c.zip |
[feature/avatars] Introduce global phpbb_avatar_manager
PHPBB3-10018
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r-- | phpBB/includes/functions_display.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index c59805dacd..e1dd67aeaf 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -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) { |