From: Giuseppe Bilotta Date: Mon, 26 Jan 2009 11:50:11 +0000 (+0100) Subject: gitweb: channel image in rss feed X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/e653808b9d049144c2805855b92ebe85daf3fc7c89aa8ae8534c4ffdbdac4d52 gitweb: channel image in rss feed Define the channel image for the rss feed when the logo or favicon are defined, preferring the former to the latter. As suggested in the RSS 2.0 specifications, the image's title and link as set to the same as the channel's. Signed-off-by: Giuseppe Bilotta Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index a1b1c36..78f54e7 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -6076,6 +6076,16 @@ XML "$alt_url\n" . "$descr\n" . "en\n"; + if (defined $logo || defined $favicon) { + # prefer the logo to the favicon, since RSS + # doesn't allow both + my $img = esc_url($logo || $favicon); + print "\n" . + "$img\n" . + "$title\n" . + "$alt_url\n" . + "\n"; + } } elsif ($format eq 'atom') { print <