fixed author links in shortlog
authorpk910 <philipp@zoelle1.de>
Fri, 7 Sep 2012 20:15:33 +0000 (22:15 +0200)
committerpk910 <philipp@zoelle1.de>
Fri, 7 Sep 2012 20:15:33 +0000 (22:15 +0200)
patch/gitweb.cgi.diff

index d7ad041e0eda7427ff017a8570659143ed4a012d..dd7dbeeda05507a98c7c55b09e5c4959edb50075 100644 (file)
@@ -1,6 +1,6 @@
 --- index.cgi  2012-08-29 01:30:10 +0000
-+++ index-graph.cgi    2012-09-07 19:06:10 +0000
-@@ -4764,13 +4768,33 @@
++++ index-graph.cgi    2012-09-07 20:12:12 +0000
+@@ -4764,13 +4768,37 @@
  
  sub git_shortlog_body {
        # uses global variable $project
 +      my $graph_rand = int(rand(99999));
 +
 +      my $head = git_get_head_hash($project); 
++    my $graph_hash;
 +    if (defined $allrefs && $allrefs == 1) {
-+        $hash = "all";
++        $graph_hash = "all";
 +    }
 +      if (!defined $hash) {
 +              $hash = $head;
 +      }
++    if(!defined $graph_hash) {
++        $graph_hash = $hash;
++    }
 +      if (!defined $page) {
 +              $page = 0;
 +      }
 +
 +    print "<tr class=\"header\">\n";
-+    print "<td colspan=\"2\"><img class=\"graph\" src=\"git_graph.php?r=".$graph_rand.";p=".$project.";h=".$hash.";from=".($from + (100 * $page)).";to=".($to + (100 * $page)).";c=header\" /></td>\n";
++    print "<td colspan=\"2\"><img class=\"graph\" src=\"git_graph.php?r=".$graph_rand.";p=".$project.";h=".$graph_hash.";from=".($from + (100 * $page)).";to=".($to + (100 * $page)).";c=header\" /></td>\n";
 +    print "<td valign=\"bottom\"><b>Author</b></td>\n";
 +    print "<td valign=\"bottom\"><b>Commit</b></td>\n";
 +    print "<td></td>\n";
        for (my $i = $from; $i <= $to; $i++) {
                my %co = %{$commitlist->[$i]};
                my $commit = $co{'id'};
-@@ -4781,6 +4805,7 @@
+@@ -4781,6 +4809,7 @@
                        print "<tr class=\"light\">\n";
                }
                $alternate ^= 1;
-+              print "<td><img class=\"graph\" src=\"git_graph.php?r=".$graph_rand.";p=".$project.";h=".$hash.";from=".($from + (100 * $page)).";to=".($to + (100 * $page)).";c=".$commit."\" /></td>";
++              print "<td><img class=\"graph\" src=\"git_graph.php?r=".$graph_rand.";p=".$project.";h=".$graph_hash.";from=".($from + (100 * $page)).";to=".($to + (100 * $page)).";c=".$commit."\" /></td>";
                # git_summary() used print "<td><i>$co{'age_string'}</i></td>\n" .
                print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n" .
                      format_author_html('td', \%co, 10) . "<td>";
-@@ -5167,12 +5194,12 @@
+@@ -5167,12 +5198,12 @@
  
        # we need to request one more than 16 (0..15) to check if
        # those 16 are all
@@ -59,7 +63,7 @@
        }
  
        if (@taglist) {
-@@ -5847,8 +5874,10 @@
+@@ -5847,8 +5878,10 @@
        my ($fmt_name, $body_subr, $base, $parent, $file_name, $file_hash) = @_;
  
        my $head = git_get_head_hash($project);
@@ -70,7 +74,7 @@
        }
        if (!defined $page) {
                $page = 0;
-@@ -5856,7 +5885,10 @@
+@@ -5856,7 +5889,10 @@
        my $refs = git_get_references();
  
        my $commit_hash = $base;
@@ -82,7 +86,7 @@
                $commit_hash = "$parent..$base";
        }
        my @commitlist =
-@@ -5912,7 +5944,7 @@
+@@ -5912,7 +5948,7 @@
                if (defined $file_name);
  
        $body_subr->(\@commitlist, 0, 99, $refs, $next_link,