diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2015-06-16 12:33:17 +0200 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2015-06-16 12:33:17 +0200 |
| commit | dc9245dd7a5a13f67667df835957740b553d2313 (patch) | |
| tree | 7bb1eb6e7c20a94e4e14fab371882cdb8e46ccbc /phpBB/phpbb/user_loader.php | |
| parent | c6308ee7c0681b5c99185f009e7a59f1c7c8f1d5 (diff) | |
| parent | d1c4f5bc352b89da7b0fba4925c68f596f623494 (diff) | |
| download | forums-dc9245dd7a5a13f67667df835957740b553d2313.tar forums-dc9245dd7a5a13f67667df835957740b553d2313.tar.gz forums-dc9245dd7a5a13f67667df835957740b553d2313.tar.bz2 forums-dc9245dd7a5a13f67667df835957740b553d2313.tar.xz forums-dc9245dd7a5a13f67667df835957740b553d2313.zip | |
Merge pull request #3653 from callumacrae/ticket/13882
[ticket/13882] Lazy load the notification avatars.
Diffstat (limited to 'phpBB/phpbb/user_loader.php')
| -rw-r--r-- | phpBB/phpbb/user_loader.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/phpbb/user_loader.php b/phpBB/phpbb/user_loader.php index 24e663b150..5ce8ca2d4d 100644 --- a/phpBB/phpbb/user_loader.php +++ b/phpBB/phpbb/user_loader.php @@ -179,9 +179,10 @@ class user_loader * @param bool $query Should we query the database if this user has not yet been loaded? * Typically this should be left as false and you should make sure * you load users ahead of time with load_users() + * @param bool @lazy If true, will be lazy loaded (requires JS) * @return string */ - public function get_avatar($user_id, $query = false) + public function get_avatar($user_id, $query = false, $lazy = false) { if (!($user = $this->get_user($user_id, $query))) { @@ -193,7 +194,7 @@ class user_loader include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); } - return get_user_avatar($user['user_avatar'], $user['user_avatar_type'], $user['user_avatar_width'], $user['user_avatar_height']); + return get_user_avatar($user['user_avatar'], $user['user_avatar_type'], $user['user_avatar_width'], $user['user_avatar_height'], 'USER_AVATAR', false, $lazy); } /** |
