mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/13703] Use correct avatar path for PHPBB_USE_BOARD_URL_PATH
This change makes the uploaded avatars use the PHPBB_USE_BOARD_URL_PATH constant, which is needed when trying to use the get_user_avatar() function in a listener for index changes. PHPBB3-13703
This commit is contained in:
parent
71177c38dc
commit
a875802c06
1 changed files with 3 additions and 1 deletions
|
@ -48,8 +48,10 @@ class upload extends \phpbb\avatar\driver\driver
|
||||||
*/
|
*/
|
||||||
public function get_data($row, $ignore_config = false)
|
public function get_data($row, $ignore_config = false)
|
||||||
{
|
{
|
||||||
|
$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(
|
return array(
|
||||||
'src' => $this->path_helper->get_web_root_path() . 'download/file.' . $this->php_ext . '?avatar=' . $row['avatar'],
|
'src' => $root_path . 'download/file.' . $this->php_ext . '?avatar=' . $row['avatar'],
|
||||||
'width' => $row['avatar_width'],
|
'width' => $row['avatar_width'],
|
||||||
'height' => $row['avatar_height'],
|
'height' => $row['avatar_height'],
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue