1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/14285] Use route service for download routes

PHPBB3-14285
This commit is contained in:
rubencm
2021-03-21 21:46:56 +01:00
parent f66c1d9e1e
commit c375f2c9e5
12 changed files with 106 additions and 49 deletions

View File

@@ -167,7 +167,9 @@ class helper
$content .= implode('<br />', $post_attachments);
// Convert attachments' relative path to absolute path
$content = str_replace($this->path_helper->get_web_root_path() . 'download/file.' . $this->path_helper->get_php_ext(), $this->get_board_url() . '/download/file.' . $this->path_helper->get_php_ext(), $content);
$pattern = '#(/app.php)/?download/attachment/#';
$replacement = $this->get_board_url() . '\1/download/attachment/';
$content = preg_replace($pattern, $replacement, $content);
}
// Remove Comments from inline attachments [ia]