Bug 20832: Fix opac user profile page when there is overdue fine and no rental charge
[koha.git] / opac / opac-search.pl
index f06e40a..1d7615b 100755 (executable)
@@ -108,7 +108,7 @@ if ($format =~ /(rss|atom|opensearchdescription)/) {
 elsif (@params && $build_grouped_results) {
     $template_name = 'opac-results-grouped.tt';
 }
-elsif ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {
+elsif ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) || @searchCategories ) {
     $template_name = 'opac-results.tt';
 }
 else {
@@ -380,9 +380,6 @@ if ( $template_type && $template_type eq 'advsearch' ) {
         }
     }
 
-    if (C4::Context->preference('OPACNumbersPreferPhrase')) {
-        $template->param('numbersphr' => 1);
-    }
 
     output_html_with_http_headers $cgi, $cookie, $template->output;
     exit;
@@ -496,7 +493,7 @@ if (@searchCategories > 0) {
 if($params->{'multibranchlimit'}) {
     my $search_group = Koha::Library::Groups->find( $params->{multibranchlimit} );
     my @libraries = $search_group->all_libraries;
-    my $multibranch = '('.join( " or ", map { 'branch: ' . $_->id } @libraries ) .')';
+    my $multibranch = '('.join( " or ", map { 'branch: ' . $_->branchcode } @libraries ) .')';
     push @limits, $multibranch if ($multibranch ne  '()');
 }