aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-08-28 17:34:50 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-08-28 17:34:50 +0200
commit214c5c6d0b2145e9a315cc3c873ed8927680046c (patch)
treedeb1005a0fb7d48f7466b9b6354f25eed5723433
parentc3ceafb37d42464627ca8f30081957af2c2ff967 (diff)
parentbfbce5a1b0b2e22ea2027d82d87c8bc32917a5b2 (diff)
downloadforums-214c5c6d0b2145e9a315cc3c873ed8927680046c.tar
forums-214c5c6d0b2145e9a315cc3c873ed8927680046c.tar.gz
forums-214c5c6d0b2145e9a315cc3c873ed8927680046c.tar.bz2
forums-214c5c6d0b2145e9a315cc3c873ed8927680046c.tar.xz
forums-214c5c6d0b2145e9a315cc3c873ed8927680046c.zip
Merge branch '3.1.x'
* 3.1.x: [ticket/13988] Update tests [ticket/13988] Use absolute path for image attachments in feeds
-rw-r--r--phpBB/phpbb/feed/helper.php6
-rw-r--r--tests/functional/feed_test.php2
2 files changed, 3 insertions, 5 deletions
diff --git a/phpBB/phpbb/feed/helper.php b/phpBB/phpbb/feed/helper.php
index 75736bc981..e15d1e131e 100644
--- a/phpBB/phpbb/feed/helper.php
+++ b/phpBB/phpbb/feed/helper.php
@@ -149,12 +149,10 @@ class helper
{
$update_count = array();
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
- $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 = str_replace($this->phpbb_root_path . 'download/file.' . $this->phpEx, $this->get_board_url() . '/download/file.' . $this->phpEx, $content);
}
// Remove Comments from inline attachments [ia]
diff --git a/tests/functional/feed_test.php b/tests/functional/feed_test.php
index fc3f052e91..16afced238 100644
--- a/tests/functional/feed_test.php
+++ b/tests/functional/feed_test.php
@@ -1404,7 +1404,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
$content = $crawler->filterXPath("//entry[{$entry_id}]/content")->text();
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}";
if ($attachment['displayed'])