- if (@forklist) {
- git_print_header_div('forks');
- git_project_list_body(\@forklist, 'age', 0, 15,
- $#forklist <= 15 ? undef :
- $cgi->a({-href => href(action=>"forks")}, "..."),
- 'no_header');
+ # If present, print one of the following, in order:
+ # README.md, README.txt, README, README.html.
+ my $cwd_path = "$projectroot/$project";
+ $cwd_path =~ s/\.git$//;
+ $cwd_path = $cwd_path . $basedir;
+ if (!$prevent_xss && -s $cwd_path . "README.md") {
+ print "<div class=\"readme\">\n";
+ insert_markdown_file($cwd_path . "README.md");
+ print "\n</div>\n"; # class="readme"
+ } elsif (!$prevent_xss && -s $cwd_path . "README.txt") {
+ print "<div class=\"readme\">\n";
+ insert_text_file($cwd_path . "README.txt");
+ print "\n</div>\n"; # class="readme"
+ } elsif (!$prevent_xss && -s $cwd_path . "README") {
+ print "<div class=\"readme\">\n";
+ insert_text_file($cwd_path . "README");
+ print "\n</div>\n"; # class="readme"
+ } elsif (!$prevent_xss && -s $cwd_path . "README.html") {
+ print "<div class=\"readme\">\n";
+ insert_html_file($cwd_path . "README.html");
+ print "\n</div>\n"; # class="readme"