mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.1.x'
* 3.1.x: [ticket/13988] Update tests [ticket/13988] Use absolute path for image attachments in feeds
This commit is contained in:
commit
214c5c6d0b
2 changed files with 3 additions and 5 deletions
|
@ -149,12 +149,10 @@ class helper
|
||||||
{
|
{
|
||||||
$update_count = array();
|
$update_count = array();
|
||||||
parse_attachments($forum_id, $content, $post_attachments, $update_count);
|
parse_attachments($forum_id, $content, $post_attachments, $update_count);
|
||||||
$post_attachments = implode('<br />', $post_attachments);
|
$content .= 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/file.' . $this->phpEx, $this->get_board_url() . '/download/file.' . $this->phpEx, $post_attachments);
|
$content = str_replace($this->phpbb_root_path . 'download/file.' . $this->phpEx, $this->get_board_url() . '/download/file.' . $this->phpEx, $content);
|
||||||
|
|
||||||
$content .= $post_attachments;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove Comments from inline attachments [ia]
|
// Remove Comments from inline attachments [ia]
|
||||||
|
|
|
@ -1404,7 +1404,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
|
||||||
$content = $crawler->filterXPath("//entry[{$entry_id}]/content")->text();
|
$content = $crawler->filterXPath("//entry[{$entry_id}]/content")->text();
|
||||||
foreach ($attachments as $i => $attachment)
|
foreach ($attachments as $i => $attachment)
|
||||||
{
|
{
|
||||||
$url = "./download/file.php?id={$attachment['id']}";
|
$url = self::$root_url . "download/file.php?id={$attachment['id']}";
|
||||||
$string = "Attachment #{$i}";
|
$string = "Attachment #{$i}";
|
||||||
|
|
||||||
if ($attachment['displayed'])
|
if ($attachment['displayed'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue