1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-20 15:53:14 +02:00

[ticket/13742] Use correct avatar path for local avatar

Prior to this change, the path might have been incorrect when using
PHPBB_USE_BOARD_URL_PATH.

PHPBB3-13742
This commit is contained in:
Kevin Roy 2015-04-03 09:35:44 -03:00 committed by Marc Alexander
parent 71177c38dc
commit ddff81c21f

View File

@ -23,8 +23,10 @@ class local extends \phpbb\avatar\driver\driver
*/
public function get_data($row)
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $this->path_helper->get_web_root_path();
return array(
'src' => $this->path_helper->get_web_root_path() . $this->config['avatar_gallery_path'] . '/' . $row['avatar'],
'src' => $root_path . $this->config['avatar_gallery_path'] . '/' . $row['avatar'],
'width' => $row['avatar_width'],
'height' => $row['avatar_height'],
);