From: Giuseppe Bilotta Date: Mon, 26 Jan 2009 11:50:11 +0000 (+0100) Subject: gitweb: channel image in rss feed X-Git-Tag: v1.6.2-rc0~76 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1ba68ce23788dfc5cbe3501cb6b1ee95e68cf5a8;p=git.git 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/gitweb.perl b/gitweb/gitweb.perl index 931db4f7e..f8a5d2e07 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 <