Bug 6170: Do not prematurely group results
authorColin Campbell <colin.campbell@ptfs-europe.com>
Tue, 12 Apr 2011 20:43:41 +0000 (22:43 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Tue, 12 Apr 2011 22:54:22 +0000 (10:54 +1200)
If OPACGroupResults preference was set it was
shortcircuiting the template selection logic and
we didn't go to the advanced options field

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
opac/opac-search.pl

index 778c7ca..7531513 100755 (executable)
@@ -66,7 +66,7 @@ my $build_grouped_results = C4::Context->preference('OPACGroupResults');
 if ($format =~ /(rss|atom|opensearchdescription)/) {
        $template_name = 'opac-opensearch.tmpl';
 }
-elsif ($build_grouped_results) {
+elsif (@params && $build_grouped_results) {
     $template_name = 'opac-results-grouped.tmpl';
 }
 elsif ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {