X-Git-Url: https://git.chrismorgan.info/gitweb/blobdiff_plain/a21510b946408b22da99ab135f676e9972ca9455..fa7af1387e339bf3628abafca83a76b271de53e6:/gitweb.cgi?ds=sidebyside diff --git a/gitweb.cgi b/gitweb.cgi index f8d82f7..099d2b3 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -887,7 +887,6 @@ our %actions = ( "patch" => \&git_patch, "patches" => \&git_patches, "remotes" => \&git_remotes, - "rss" => \&git_rss, "atom" => \&git_atom, "search" => \&git_search, "search_help" => \&git_search_help, @@ -907,7 +906,7 @@ our %actions = ( # finally, we have the hash of allowed extra_options for the commands that # allow them our %allowed_options = ( - "--no-merges" => [ qw(rss atom log shortlog history) ], + "--no-merges" => [ qw(atom log shortlog history) ], ); # fill %input_params with the CGI parameters. All values except for 'opt' @@ -4027,40 +4026,36 @@ sub run_highlighter { ## functions printing HTML: header, footer, error page sub get_page_title { - my $title = to_utf8($site_name); - + # Formats: + # SITE_NAME + # SITE_NAME - projects in FILTER + # PROJECT - SITE_NAME + # PROJECT ACTION - SITE_NAME + # FILENAME - PROJECT ACTION - SITE_NAME + my $title; unless (defined $project) { + $title = to_utf8($site_name); if (defined $project_filter) { $title .= " - projects in '" . esc_path($project_filter) . "'"; } return $title; } - $title .= " - " . to_utf8($project); - - return $title unless (defined $action); - $title .= "/$action"; # $action is US-ASCII (7bit ASCII) + $title = to_utf8($project); - return $title unless (defined $file_name); - $title .= " - " . esc_path($file_name); - if ($action eq "tree" && $file_name !~ m|/$|) { - $title .= "/"; + if (defined $action) { + $title .= " $action"; # $action is US-ASCII (7bit ASCII) + if (defined $file_name) { + $title = " - " . $title; + if ($action eq "tree" && $file_name !~ m|/$|) { + $title = "/" . $title; + } + $title = esc_path($file_name) . $title; + } } - return $title; -} + $title .= " - " . to_utf8($site_name); -sub get_content_type_html { - # require explicit support from the UA if we are to send the page as - # 'application/xhtml+xml', otherwise send it as plain old 'text/html'. - # we have to do this because MSIE sometimes globs '*/*', pretending to - # support xhtml+xml but choking when it gets what it asked for. - if (defined $cgi->http('HTTP_ACCEPT') && - $cgi->http('HTTP_ACCEPT') =~ m/(,|;|\s|^)application\/xhtml\+xml(,|;|\s|$)/ && - $cgi->Accept('application/xhtml+xml') != 0) { - return 'application/xhtml+xml'; - } else { - return 'text/html'; - } + return $title; } sub print_feed_meta { @@ -4070,7 +4065,7 @@ sub print_feed_meta { $href_params{'-title'} = 'log'; } - foreach my $format (qw(RSS Atom)) { + foreach my $format (qw(Atom)) { my $type = lc($format); my %link_attr = ( '-rel' => 'alternate', @@ -4117,17 +4112,17 @@ sub print_header_links { # print out each stylesheet that exist, providing backwards capability # for those people who defined $stylesheet in a config file if (defined $stylesheet) { - print ''."\n"; + print ''."\n"; } else { foreach my $stylesheet (@stylesheets) { next unless $stylesheet; - print ''."\n"; + print ''."\n"; } } print_feed_meta() if ($status eq '200 OK'); if (defined $favicon) { - print qq(\n); + print qq(\n); } } @@ -4188,8 +4183,7 @@ sub print_search_form { if ($use_pathinfo) { $action .= "/".esc_url($project); } - print $cgi->start_form(-method => "get", -action => $action) . - "
description | " . esc_html($descr) . " | ||||||||||||
description | " . esc_html($descr) . " | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
owner | " . esc_html($owner) . " | ||||||||||||
owner | " . esc_html($owner) . " | ||||||||||||
last change | " . + print "|||||||||||||
last change | " . "".format_timestamp_html(\%cd)." | ||||||||||||
content tags | " . + "content tags | " . "".git_show_project_tagcloud($cloud, 48)." | " . "
object | \n" . + "object | \n" . "" . $cgi->a({-class => "list", -href => href(action=>$tag{'type'}, hash=>$tag{'object'})}, $tag{'object'}) . " | \n" . "" . $cgi->a({-href => href(action=>$tag{'type'}, hash=>$tag{'object'})},
@@ -7178,9 +7169,8 @@ sub git_blob {
git_print_page_nav('','', $hash_base,$co{'tree'},$hash_base, $formats_nav);
git_print_header_div('commit', esc_html($co{'title'}), $hash_base);
} else {
- print " \n" .
- " \n" .
- "".esc_html($hash)." \n";
+ git_end_subhead_html();
+ print "".esc_html($hash)." \n";
}
git_print_page_path($file_name, "blob", $hash_base);
print "\n";
@@ -7199,7 +7189,7 @@ sub git_blob {
chomp $line;
$nr++;
$line = untabify($line);
- printf qq! %4i %s \n!,
+ printf qq!%4i %s \n!,
$nr, esc_attr(href(-replay => 1)), $nr, $nr,
$highlight ? sanitize($line) : esc_html($line, -nbsp=>1);
}
@@ -7261,8 +7251,7 @@ sub git_tree {
git_print_header_div('commit', esc_html($co{'title'}) . $ref, $hash_base);
} else {
undef $hash_base;
- print "\n";
- print " \n";
+ git_end_subhead_html();
print "".esc_html($hash)." \n";
}
if (defined $file_name) {
@@ -7609,9 +7598,9 @@ sub git_commit {
print "\n" .
"
|
---|