From 1ba68ce23788dfc5cbe3501cb6b1ee95e68cf5a8 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 26 Jan 2009 12:50:11 +0100 Subject: [PATCH] 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 --- gitweb/gitweb.perl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 931db4f7eb..f8a5d2e077 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -6075,6 +6075,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 <