summaryrefslogtreecommitdiff
path: root/feed.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-03-14 17:09:29 +0100
committerAndreas Gohr <andi@splitbrain.org>2014-03-14 17:09:29 +0100
commit3275c5d6feb683bf4151f7d4867b10431b254d1e (patch)
tree4fd5e9ecf9165eb1b7cddd3d2bb1ae1330db92ab /feed.php
parent8fcb305db0081dacd8e8ad0583da5ecc6c6837dc (diff)
parent1359eacbdbff842b241a85ea274a00982fec9267 (diff)
downloadrpg-3275c5d6feb683bf4151f7d4867b10431b254d1e.tar.gz
rpg-3275c5d6feb683bf4151f7d4867b10431b254d1e.tar.bz2
Merge branch 'master' into diff_navigation
* master: (103 commits) Add a basic test case for the cache Events: Trigger a warning if the default action is not callable Fix caching (make the event callback public again) translation update translation update translation update translation update translation update translation update translation update avoid HTTP image screenshot urls. closes #595 translation update Extension manager: Fix cache extension to be .repo adjusted the office type color again another instance of empty() where an array key might not exist remove placeholder van denied.txt updated file icons once more removed 'not logged in' text, loginform is shown already Revert "added stripped bit to language file" fixed index file ... Conflicts: inc/html.php
Diffstat (limited to 'feed.php')
-rw-r--r--feed.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/feed.php b/feed.php
index a0d76c966..5bf1d2e85 100644
--- a/feed.php
+++ b/feed.php
@@ -20,8 +20,7 @@ $opt = rss_parseOptions();
// the feed is dynamic - we need a cache for each combo
// (but most people just use the default feed so it's still effective)
-$cache = getCacheName(join('', array_values($opt)).$_SERVER['REMOTE_USER'], '.feed');
-$key = join('', array_values($opt)).$_SERVER['REMOTE_USER'];
+$key = join('', array_values($opt)).'$'.$_SERVER['REMOTE_USER'].'$'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'];
$cache = new cache($key, '.feed');
// prepare cache depends
@@ -300,12 +299,12 @@ function rss_buildItems(&$rss, &$data, $opt) {
$src_l = '';
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);
+ $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
+ $src_r = ml($id, $more, true, '&amp;', 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, '&amp;', true);
}
$content = '';
if($src_r) {
@@ -349,8 +348,8 @@ function rss_buildItems(&$rss, &$data, $opt) {
case 'html':
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);
+ $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
+ $src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
} else {
$content = '';
@@ -380,8 +379,8 @@ function rss_buildItems(&$rss, &$data, $opt) {
default:
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);
+ $more = 'w='.$size[0].'&h='.$size[1].'&t='.@filemtime(mediaFN($id));
+ $src = ml($id, $more, true, '&amp;', true);
$content = '<img src="'.$src.'" alt="'.$id.'" />';
} else {
$content = '';