X-Git-Url: https://git.chrismorgan.info/gitweb/blobdiff_plain/a21510b946408b22da99ab135f676e9972ca9455..716b1f745fdbbbec87d4300191bc2721291b1baf:/gitweb.cgi diff --git a/gitweb.cgi b/gitweb.cgi index f8d82f7..f57ed5a 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) . - "
\n"; foreach my $line (@$comment) { @@ -8424,27 +8375,13 @@ XML print "] ". "$file\n"; } - if ($format eq 'rss') { - print "]]>\n" . - "\n" . - "\n"; - } elsif ($format eq 'atom') { - print "\n