more tags
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Kay Sievers committed
Dec 7, 2005 at 16:10 UTC
edde3735d06e2581647308966a6b7a77d09a1427
1 file changed
+22
-7
gitweb.cgi
+22
-7
@@ -1050,7 +1050,7 @@ sub git_summary {
1050
if ($i-- > 0) {
1051
my $ref = "";
1052
if (defined $refs->{$commit}) {
1053
- $ref = " <span class=\"tag\">$refs->{$commit}</span>";
1053
+ $ref = " <span class=\"tag\">" . esc_html($refs->{$commit}) . "</span>";
1054
}
1055
print "<td><i>$co{'age_string'}</i></td>\n" .
1056
"<td><i>" . esc_html(chop_str($co{'author_name'}, 10)) . "</i></td>\n" .
@@ -1417,6 +1417,11 @@ sub git_tree {
1417
close $fd or die_error(undef, "Reading tree failed.");
1418
$/ = "\n";
1419
1420
+ my $refs = read_info_ref();
1421
+ my $ref = "";
1422
+ if (defined $refs->{$hash_base}) {
1423
+ $ref = " <span class=\"tag\">" . esc_html($refs->{$hash_base}) . "</span>";
1424
+ }
1425
git_header_html();
1426
my $base_key = "";
1427
my $base = "";
@@ -1432,7 +1437,7 @@ sub git_tree {
1437
"<br/><br/>\n" .
1438
"</div>\n";
1439
print "<div>\n" .
1435
- $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash_base"), -class => "title"}, esc_html($co{'title'})) . "\n" .
1440
+ $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash_base"), -class => "title"}, esc_html($co{'title'}) . $ref) . "\n" .
1441
"</div>\n";
1442
} else {
1443
print "<div class=\"page_nav\">\n";
@@ -1629,7 +1634,7 @@ sub git_log {
1634
my $commit = $revlist[$i];
1635
my $ref = "";
1636
if (defined $refs->{$commit}) {
1632
- $ref = " <span class=\"tag\">$refs->{$commit}</span>";
1637
+ $ref = " <span class=\"tag\">" . esc_html($refs->{$commit}) . "</span>";
1638
}
1639
my %co = git_read_commit($commit);
1640
next if !%co;
@@ -1695,6 +1700,11 @@ sub git_commit {
1700
if ($hash =~ m/^[0-9a-fA-F]{40}$/) {
1701
$expires = "+1d";
1702
}
1703
+ my $refs = read_info_ref();
1704
+ my $ref = "";
1705
+ if (defined $refs->{$hash}) {
1706
+ $ref = " <span class=\"tag\">" . esc_html($refs->{$hash}) . "</span>";
1707
+ }
1708
git_header_html(undef, $expires);
1709
print "<div class=\"page_nav\">\n" .
1710
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=summary")}, "summary") .
@@ -1708,7 +1718,7 @@ sub git_commit {
1718
"<br/><br/></div>\n";
1719
if (defined $co{'parent'}) {
1720
print "<div>\n" .
1711
- $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$hash"), -class => "title"}, esc_html($co{'title'})) . "\n" .
1721
+ $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$hash"), -class => "title"}, esc_html($co{'title'}) . $ref) . "\n" .
1722
"</div>\n";
1723
} else {
1724
print "<div>\n" .
@@ -1932,6 +1942,11 @@ sub git_commitdiff {
1942
if ($hash =~ m/^[0-9a-fA-F]{40}$/) {
1943
$expires = "+1d";
1944
}
1945
+ my $refs = read_info_ref();
1946
+ my $ref = "";
1947
+ if (defined $refs->{$hash}) {
1948
+ $ref = " <span class=\"tag\">" . esc_html($refs->{$hash}) . "</span>";
1949
+ }
1950
git_header_html(undef, $expires);
1951
print "<div class=\"page_nav\">\n" .
1952
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=summary")}, "summary") .
@@ -1943,7 +1958,7 @@ sub git_commitdiff {
1958
print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff_plain;h=$hash;hp=$hash_parent")}, "plain") . "\n" .
1959
"</div>\n";
1960
print "<div>\n" .
1946
- $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash"), -class => "title"}, esc_html($co{'title'})) . "\n" .
1961
+ $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$hash"), -class => "title"}, esc_html($co{'title'}) . $ref) . "\n" .
1962
"</div>\n";
1963
print "<div class=\"page_body\">\n";
1964
my $comment = $co{'comment'};
@@ -2101,7 +2116,7 @@ sub git_history {
2116
}
2117
my $ref = "";
2118
if (defined $refs->{$commit}) {
2104
- $ref = " <span class=\"tag\">$refs->{$commit}</span>";
2119
+ $ref = " <span class=\"tag\">" . esc_html($refs->{$commit}) . "</span>";
2120
}
2121
if ($alternate) {
2122
print "<tr class=\"dark\">\n";
@@ -2330,7 +2345,7 @@ sub git_shortlog {
2345
my $commit = $revlist[$i];
2346
my $ref = "";
2347
if (defined $refs->{$commit}) {
2333
- $ref = " <span class=\"tag\">$refs->{$commit}</span>";
2348
+ $ref = " <span class=\"tag\">" . esc_html($refs->{$commit}) . "</span>";
2349
}
2350
my %co = git_read_commit($commit);
2351
my %ad = date_str($co{'author_epoch'});