Update functions.php 2

This commit is contained in:
phpBB TR 2024-04-12 17:54:50 +03:00 committed by GitHub
parent 29b8e2d8f1
commit 0f8f012ce8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3626,12 +3626,8 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
$phpbb_path_helper = $phpbb_container->get('path_helper');
$web_path = $phpbb_path_helper->get_web_root_path();
$theme = "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme';
$no_avatar = $theme . '/images/no_avatar.gif';
$src = 'src=' . $no_avatar . ' data-src=' . $no_avatar;
$html = '<img class="avatar" ' . $src . ' ' .
($avatar_data['width'] ? ('width="' . $avatar_data['width'] . '" ') : '') .
($avatar_data['height'] ? ('height="' . $avatar_data['height'] . '" ') : '') .
'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
$src = 'src="' . $theme . '/images/no_avatar.gif"';
$html = '<img class="avatar" ' . $src . ' ' . 'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
if (empty($html) && !empty($avatar_data['src']))