aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/avatar/driver/driver.php10
-rw-r--r--phpBB/phpbb/avatar/driver/local.php2
-rw-r--r--phpBB/phpbb/avatar/driver/upload.php2
3 files changed, 11 insertions, 3 deletions
diff --git a/phpBB/phpbb/avatar/driver/driver.php b/phpBB/phpbb/avatar/driver/driver.php
index 0c54951cbd..206df86543 100644
--- a/phpBB/phpbb/avatar/driver/driver.php
+++ b/phpBB/phpbb/avatar/driver/driver.php
@@ -48,6 +48,12 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
protected $php_ext;
/**
+ * Path Helper
+ * @var \phpbb\path_helper
+ */
+ protected $path_helper;
+
+ /**
* Cache driver
* @var \phpbb\cache\driver\driver_interface
*/
@@ -75,13 +81,15 @@ abstract class driver implements \phpbb\avatar\driver\driver_interface
* @param \phpbb\request\request $request Request object
* @param string $phpbb_root_path Path to the phpBB root
* @param string $php_ext PHP file extension
+ * @param \phpbb_path_helper $path_helper phpBB path helper
* @param \phpbb\cache\driver\driver_interface $cache Cache driver
*/
- public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\cache\driver\driver_interface $cache = null)
+ public function __construct(\phpbb\config\config $config, $phpbb_root_path, $php_ext, \phpbb\path_helper $path_helper, \phpbb\cache\driver\driver_interface $cache = null)
{
$this->config = $config;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
+ $this->path_helper = $path_helper;
$this->cache = $cache;
}
diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php
index d779099c46..0686ffe79a 100644
--- a/phpBB/phpbb/avatar/driver/local.php
+++ b/phpBB/phpbb/avatar/driver/local.php
@@ -29,7 +29,7 @@ class local extends \phpbb\avatar\driver\driver
public function get_data($row)
{
return array(
- 'src' => $this->phpbb_root_path . $this->config['avatar_gallery_path'] . '/' . $row['avatar'],
+ 'src' => $this->path_helper->get_web_root_path() . $this->config['avatar_gallery_path'] . '/' . $row['avatar'],
'width' => $row['avatar_width'],
'height' => $row['avatar_height'],
);
diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php
index 377c9a0b04..bda872df7a 100644
--- a/phpBB/phpbb/avatar/driver/upload.php
+++ b/phpBB/phpbb/avatar/driver/upload.php
@@ -29,7 +29,7 @@ class upload extends \phpbb\avatar\driver\driver
public function get_data($row, $ignore_config = false)
{
return array(
- 'src' => $this->phpbb_root_path . 'download/file.' . $this->php_ext . '?avatar=' . $row['avatar'],
+ 'src' => $this->path_helper->get_web_root_path() . 'download/file.' . $this->php_ext . '?avatar=' . $row['avatar'],
'width' => $row['avatar_width'],
'height' => $row['avatar_height'],
);