summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-11-07 22:00:45 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2006-11-07 22:00:45 -0800
commit5dd5ed09fe6b5508cf29dd1dbf40bea2f0d16ad3 (patch)
tree5a3af0ce41134db7cb82d183812b142711da91ce /gitweb
parentGIT 1.4.3-rc1 (diff)
downloadtgif-5dd5ed09fe6b5508cf29dd1dbf40bea2f0d16ad3.tar.xz
gitweb: fix disabling of "forks"
Apparently this code was never tested without "forks". check-feature returns a one-element list (0) when disabled, and assigning that to a scalar variable made it to be called in a scalar context, which meant my $check_forks = gitweb_check_feature("forks") were always 1! Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl8
1 files changed, 5 insertions, 3 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3c6fd7ca47..680832c986 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -926,7 +926,7 @@ sub git_get_projects_list {
$dir =~ s!/+$!!;
my $pfxlen = length("$dir");
- my $check_forks = gitweb_check_feature('forks');
+ my ($check_forks) = gitweb_check_feature('forks');
File::Find::find({
follow_fast => 1, # follow symbolic links
@@ -2212,7 +2212,7 @@ sub git_patchset_body {
sub git_project_list_body {
my ($projlist, $order, $from, $to, $extra, $no_header) = @_;
- my $check_forks = gitweb_check_feature('forks');
+ my ($check_forks) = gitweb_check_feature('forks');
my @projects;
foreach my $pr (@$projlist) {
@@ -2614,7 +2614,9 @@ sub git_summary {
my @taglist = git_get_tags_list(15);
my @headlist = git_get_heads_list(15);
my @forklist;
- if (gitweb_check_feature('forks')) {
+ my ($check_forks) = gitweb_check_feature('forks');
+
+ if ($check_forks) {
@forklist = git_get_projects_list($project);
}