gitweb: Add author and contributor email to Atom feed
Add author email (from 'author_email') and contributor email (from 'committer_email') to items in the Atom format gitweb feed. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Jakub Narebski committed
Nov 25, 2006 at 15:54 UTC
ab23c19d67d283567fdf18966e347a78ade56c22
1 file changed
+12
-2
gitweb/gitweb.perl
+12
-2
@@ -4323,9 +4323,19 @@ XML
4323
print "<entry>\n" .
4324
"<title type=\"html\">" . esc_html($co{'title'}) . "</title>\n" .
4325
"<updated>$cd{'iso-8601'}</updated>\n" .
4326
- "<author><name>" . esc_html($co{'author_name'}) . "</name></author>\n" .
4326
+ "<author>\n" .
4327
+ " <name>" . esc_html($co{'author_name'}) . "</name>\n";
4328
+ if ($co{'author_email'}) {
4329
+ print " <email>" . esc_html($co{'author_email'}) . "</email>\n";
4330
+ }
4331
+ print "</author>\n" .
4332
# use committer for contributor
4328
- "<contributor><name>" . esc_html($co{'committer_name'}) . "</name></contributor>\n" .
4333
+ "<contributor>\n" .
4334
+ " <name>" . esc_html($co{'committer_name'}) . "</name>\n";
4335
+ if ($co{'committer_email'}) {
4336
+ print " <email>" . esc_html($co{'committer_email'}) . "</email>\n";
4337
+ }
4338
+ print "</contributor>\n" .
4339
"<published>$cd{'iso-8601'}</published>\n" .
4340
"<link rel=\"alternate\" type=\"text/html\" href=\"$co_url\" />\n" .
4341
"<id>$co_url</id>\n" .