Skip to content
Snippets Groups Projects
Commit 27538f87 authored by Christopher Smith's avatar Christopher Smith
Browse files

make media links in rss feeds absolute

This resolves issues with broken images when the wiki feed is
hosted by third parties (e.g. FeedBurner), as mentioned in
FS#2931 comments.
parent ed714c3e
No related branches found
No related tags found
No related merge requests found
......@@ -300,11 +300,11 @@ function rss_buildItems(&$rss, &$data, $opt) {
if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)), 300)) {
$more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
$src_r = ml($id, $more);
$src_r = ml($id, $more, true, '&', true);
}
if($rev && $size = media_image_preview_size($id, $rev, new JpegMeta(mediaFN($id, $rev)), 300)) {
$more = 'rev='.$rev.'&w='.$size[0].'&h='.$size[1];
$src_l = ml($id, $more);
$src_l = ml($id, $more, true, '&', true);
}
$content = '';
if($src_r) {
......@@ -348,7 +348,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
if($ditem['media']) {
if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
$more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
$src = ml($id, $more);
$src = ml($id, $more, true, '&', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
} else {
$content = '';
......@@ -379,7 +379,7 @@ function rss_buildItems(&$rss, &$data, $opt) {
if($ditem['media']) {
if($size = media_image_preview_size($id, false, new JpegMeta(mediaFN($id)))) {
$more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
$src = ml($id, $more);
$src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
} else {
$content = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment