gitweb: Clean up code in git_search_* subroutines

Replace sequence of $foo .= "bar"; $foo .= "baz"; with $foo .= "bar" . "baz"; Use href(-replay=>1, -page=>undef) for first page of a multipl-page view. Wrap some lines to reduce their length. Some lines still have more than 80 characters, but lines are shorter now. No functional changes intended. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jakub Narebski committed Jun 22, 2011 at 17:28 UTC 882541b87d8f7bedca824228a8ad14aed69c904e
1 file changed +16 -13
gitweb/gitweb.perl
+16 -13
@@ -5273,16 +5273,13 @@ sub git_search_message {
5273 my $paging_nav = '';
5274 if ($page > 0) {
5275 $paging_nav .=
5276 - $cgi->a({-href => href(action=>"search", hash=>$hash,
5277 - searchtext=>$searchtext,
5278 - searchtype=>$searchtype)},
5279 - "first");
5280 - $paging_nav .= " &sdot; " .
5276 + $cgi->a({-href => href(-replay=>1, page=>undef)},
5277 + "first") .
5278 + " &sdot; " .
5279 $cgi->a({-href => href(-replay=>1, page=>$page-1),
5280 -accesskey => "p", -title => "Alt-p"}, "prev");
5281 } else {
5284 - $paging_nav .= "first";
5285 - $paging_nav .= " &sdot; prev";
5282 + $paging_nav .= "first &sdot; prev";
5283 }
5284 my $next_link = '';
5285 if ($#commitlist >= 100) {
@@ -5327,10 +5324,13 @@ sub git_search_changes {
5324 if (%co) {
5325 print "</td>\n" .
5326 "<td class=\"link\">" .
5330 - $cgi->a({-href => href(action=>"commit", hash=>$co{'id'})}, "commit") .
5327 + $cgi->a({-href => href(action=>"commit", hash=>$co{'id'})},
5328 + "commit") .
5329 " | " .
5332 - $cgi->a({-href => href(action=>"tree", hash=>$co{'tree'}, hash_base=>$co{'id'})}, "tree");
5333 - print "</td>\n" .
5330 + $cgi->a({-href => href(action=>"tree", hash=>$co{'tree'},
5331 + hash_base=>$co{'id'})},
5332 + "tree") .
5333 + "</td>\n" .
5334 "</tr>\n";
5335 }
5336
@@ -5364,10 +5364,13 @@ sub git_search_changes {
5364 if (%co) {
5365 print "</td>\n" .
5366 "<td class=\"link\">" .
5367 - $cgi->a({-href => href(action=>"commit", hash=>$co{'id'})}, "commit") .
5367 + $cgi->a({-href => href(action=>"commit", hash=>$co{'id'})},
5368 + "commit") .
5369 " | " .
5369 - $cgi->a({-href => href(action=>"tree", hash=>$co{'tree'}, hash_base=>$co{'id'})}, "tree");
5370 - print "</td>\n" .
5370 + $cgi->a({-href => href(action=>"tree", hash=>$co{'tree'},
5371 + hash_base=>$co{'id'})},
5372 + "tree") .
5373 + "</td>\n" .
5374 "</tr>\n";
5375 }
5376