mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch 'ticket/11271' into ticket/11271-develop
* ticket/11271: [ticket/11271] Make path conversion more precise Conflicts: phpBB/feed.php
This commit is contained in:
commit
99d312da2a
2 changed files with 7 additions and 2 deletions
|
@ -5,6 +5,7 @@ services:
|
||||||
- @config
|
- @config
|
||||||
- @user
|
- @user
|
||||||
- %core.root_path%
|
- %core.root_path%
|
||||||
|
- %core.php_ext%
|
||||||
|
|
||||||
feed.factory:
|
feed.factory:
|
||||||
class: phpbb\feed\factory
|
class: phpbb\feed\factory
|
||||||
|
|
|
@ -24,6 +24,9 @@ class helper
|
||||||
/** @var string */
|
/** @var string */
|
||||||
protected $phpbb_root_path;
|
protected $phpbb_root_path;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
protected $phpEx;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
|
@ -32,11 +35,12 @@ class helper
|
||||||
* @param string $phpbb_root_path Root path
|
* @param string $phpbb_root_path Root path
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
public function __construct(\phpbb\config\config $config, \phpbb\user $user, $phpbb_root_path)
|
public function __construct(\phpbb\config\config $config, \phpbb\user $user, $phpbb_root_path, $phpEx)
|
||||||
{
|
{
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
$this->phpbb_root_path = $phpbb_root_path;
|
$this->phpbb_root_path = $phpbb_root_path;
|
||||||
|
$this->phpEx = $phpEx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,7 +149,7 @@ class helper
|
||||||
$post_attachments = implode('<br />', $post_attachments);
|
$post_attachments = implode('<br />', $post_attachments);
|
||||||
|
|
||||||
// Convert attachments' relative path to absolute path
|
// Convert attachments' relative path to absolute path
|
||||||
$post_attachments = str_replace($this->phpbb_root_path . 'download', $this->get_board_url() . '/download', $post_attachments);
|
$post_attachments = str_replace($this->phpbb_root_path . 'download/file.' . $this->phpEx, $this->get_board_url() . '/download/file.' . $this->phpEx, $post_attachments);
|
||||||
|
|
||||||
$content .= $post_attachments;
|
$content .= $post_attachments;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue