Code

Show snapshot link in shortlog only if have_snapsho
authorPetr Baudis <pasky@suse.cz>
Fri, 6 Oct 2006 13:57:52 +0000 (15:57 +0200)
committerJunio C Hamano <junkio@cox.net>
Sat, 7 Oct 2006 08:38:46 +0000 (01:38 -0700)
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl

index 3cc0e965fceb8ca8ace84feb172ba4872b35d1e1..276a84244b4b842362f3118ab7e099022660d707 100755 (executable)
@@ -2033,8 +2033,10 @@ sub git_shortlog_body {
                print "</td>\n" .
                      "<td class=\"link\">" .
                      $cgi->a({-href => href(action=>"commitdiff", hash=>$commit)}, "commitdiff") . " | " .
-                     $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree") . " | " .
-                     $cgi->a({-href => href(action=>"snapshot", hash=>$commit)}, "snapshot");
+                     $cgi->a({-href => href(action=>"tree", hash=>$commit, hash_base=>$commit)}, "tree");
+               if (gitweb_have_snapshot()) {
+                       print " | " . $cgi->a({-href => href(action=>"snapshot", hash=>$commit)}, "snapshot");
+               }
                print "</td>\n" .
                      "</tr>\n";
        }