diff options
author | Jiang Xin <worldhello.net@gmail.com> | 2012-03-16 20:18:07 +0800 |
---|---|---|
committer | Jiang Xin <worldhello.net@gmail.com> | 2012-03-16 20:18:07 +0800 |
commit | d90b16ed421eb51fc4d7c6bda5f3332cc2e3aece (patch) | |
tree | 2d90d25ecbe794492f0fb267f31af8a1f646327d /gitweb/gitweb.perl | |
parent | l10n: Improve zh_CN translation for msg "not something we can merge" (diff) | |
parent | Git 1.7.10-rc1 (diff) | |
download | tgif-d90b16ed421eb51fc4d7c6bda5f3332cc2e3aece.tar.xz |
Merge v1.7.10-rc0 for git l10n update
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-x | gitweb/gitweb.perl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index cd98888a93..a8b5fad266 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3073,15 +3073,15 @@ sub filter_forks_from_projects_list { sub search_projects_list { my ($projlist, %opts) = @_; my $tagfilter = $opts{'tagfilter'}; - my $searchtext = $opts{'searchtext'}; + my $search_re = $opts{'search_regexp'}; return @$projlist - unless ($tagfilter || $searchtext); + unless ($tagfilter || $search_re); # searching projects require filling to be run before it; fill_project_list_info($projlist, $tagfilter ? 'ctags' : (), - $searchtext ? ('path', 'descr') : ()); + $search_re ? ('path', 'descr') : ()); my @projects; PROJECT: foreach my $pr (@$projlist) { @@ -3092,10 +3092,10 @@ sub search_projects_list { grep { lc($_) eq lc($tagfilter) } keys %{$pr->{'ctags'}}; } - if ($searchtext) { + if ($search_re) { next unless - $pr->{'path'} =~ /$searchtext/ || - $pr->{'descr_long'} =~ /$searchtext/; + $pr->{'path'} =~ /$search_re/ || + $pr->{'descr_long'} =~ /$search_re/; } push @projects, $pr; @@ -5484,16 +5484,16 @@ sub git_project_list_body { my $show_ctags = gitweb_check_feature('ctags'); my $tagfilter = $show_ctags ? $input_params{'ctag'} : undef; $check_forks = undef - if ($tagfilter || $searchtext); + if ($tagfilter || $search_regexp); # filtering out forks before filling info allows to do less work @projects = filter_forks_from_projects_list(\@projects) if ($check_forks); # search_projects_list pre-fills required info @projects = search_projects_list(\@projects, - 'searchtext' => $searchtext, + 'search_regexp' => $search_regexp, 'tagfilter' => $tagfilter) - if ($tagfilter || $searchtext); + if ($tagfilter || $search_regexp); # fill the rest @projects = fill_project_list_info(\@projects); |