diff options
author | Kevin Roy <reaper@myraytech.com> | 2015-04-03 09:35:44 -0300 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-04-03 23:08:26 +0200 |
commit | ddff81c21f0f5ceb45f1925ac69775dac2ad4ba6 (patch) | |
tree | 85fe21dd876d586f776141aa25245104c9638ad5 | |
parent | 71177c38dcbd497a75a3c9be3f808c4148840481 (diff) | |
download | forums-ddff81c21f0f5ceb45f1925ac69775dac2ad4ba6.tar forums-ddff81c21f0f5ceb45f1925ac69775dac2ad4ba6.tar.gz forums-ddff81c21f0f5ceb45f1925ac69775dac2ad4ba6.tar.bz2 forums-ddff81c21f0f5ceb45f1925ac69775dac2ad4ba6.tar.xz forums-ddff81c21f0f5ceb45f1925ac69775dac2ad4ba6.zip |
[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
-rw-r--r-- | phpBB/phpbb/avatar/driver/local.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php index 8888686b2d..36087f8ba0 100644 --- a/phpBB/phpbb/avatar/driver/local.php +++ b/phpBB/phpbb/avatar/driver/local.php @@ -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'], ); |