gitweb: Add author and contributor email to Atom feed
[gitweb.git] / gitweb / gitweb.perl
index 85a896b619dd832f7d4f1ab3dfd544f0da127664..fb7026d321414557636ab9ac98432e71d572b038 100755 (executable)
@@ -4323,9 +4323,19 @@ sub git_feed {
                        print "<entry>\n" .
                              "<title type=\"html\">" . esc_html($co{'title'}) . "</title>\n" .
                              "<updated>$cd{'iso-8601'}</updated>\n" .
-                             "<author><name>" . esc_html($co{'author_name'}) . "</name></author>\n" .
+                             "<author>\n" .
+                             "  <name>" . esc_html($co{'author_name'}) . "</name>\n";
+                       if ($co{'author_email'}) {
+                               print "  <email>" . esc_html($co{'author_email'}) . "</email>\n";
+                       }
+                       print "</author>\n" .
                              # use committer for contributor
-                             "<contributor><name>" . esc_html($co{'committer_name'}) . "</name></contributor>\n" .
+                             "<contributor>\n" .
+                             "  <name>" . esc_html($co{'committer_name'}) . "</name>\n";
+                       if ($co{'committer_email'}) {
+                               print "  <email>" . esc_html($co{'committer_email'}) . "</email>\n";
+                       }
+                       print "</contributor>\n" .
                              "<published>$cd{'iso-8601'}</published>\n" .
                              "<link rel=\"alternate\" type=\"text/html\" href=\"$co_url\" />\n" .
                              "<id>$co_url</id>\n" .