X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/4bceb217435a521cf419c0fecdac3adc5d92b784eb5f4ae98d608f31db4a3249..f6ebec3087bb9b2307b389bcb45ace362932f058c7ca6ac5001ea7fec3b89cce:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 66596b5..0a8c9e2 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -3796,11 +3796,14 @@ sub git_project_list_body { my $pr = $projects[$i]; next if $tagfilter and $show_ctags and not grep { lc $_ eq lc $tagfilter } keys %{$pr->{'ctags'}}; - # Weed out forks + next if $searchtext and not $pr->{'path'} =~ /$searchtext/ + and not $pr->{'descr_long'} =~ /$searchtext/; + # Weed out forks or non-matching entries of search if ($check_forks) { my $forkbase = $project; $forkbase ||= ''; $forkbase =~ s#\.git$#/#; $forkbase="^$forkbase" if $forkbase; - next if not $tagfilter and $pr->{'path'} =~ m#$forkbase.*/.*#; # regexp-safe + next if not $searchtext and not $tagfilter and $show_ctags + and $pr->{'path'} =~ m#$forkbase.*/.*#; # regexp-safe } if ($alternate) { @@ -4137,6 +4140,11 @@ sub git_project_list { close $fd; print "\n"; } + print $cgi->startform(-method => "get") . + "

Search:\n" . + $cgi->textfield(-name => "s", -value => $searchtext) . "\n" . + "

" . + $cgi->end_form() . "\n"; git_project_list_body(\@list, $order); git_footer_html(); }