Lines 610-628
for (my $i=0;$i<@servers;$i++) {
Link Here
|
610 |
} |
610 |
} |
611 |
|
611 |
|
612 |
## If there's just one result, redirect to the detail page unless doing an index scan |
612 |
## If there's just one result, redirect to the detail page unless doing an index scan |
613 |
if ($total == 1 && !$scan) { |
613 |
if ( $total == 1 && !$scan && C4::Context->preference('RedirectToSoleResult') ) { |
614 |
my $biblionumber = $newresults[0]->{biblionumber}; |
614 |
my $biblionumber = $newresults[0]->{biblionumber}; |
615 |
my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); |
615 |
my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); |
616 |
my $views = { C4::Search::enabled_staff_search_views }; |
616 |
my $views = {C4::Search::enabled_staff_search_views}; |
617 |
if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) { |
617 |
if ( $defaultview eq 'isbd' && $views->{can_view_ISBD} ) { |
618 |
print $cgi->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber&found1=1"); |
618 |
print $cgi->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber&found1=1"); |
619 |
} elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) { |
619 |
} elsif ( $defaultview eq 'marc' && $views->{can_view_MARC} ) { |
620 |
print $cgi->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber&found1=1"); |
620 |
print $cgi->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber&found1=1"); |
621 |
} elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) { |
621 |
} elsif ( $defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC} ) { |
622 |
print $cgi->redirect("/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber&found1=1"); |
622 |
print $cgi->redirect( |
|
|
623 |
"/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber&found1=1"); |
623 |
} else { |
624 |
} else { |
624 |
print $cgi->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber&found1=1"); |
625 |
print $cgi->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber&found1=1"); |
625 |
} |
626 |
} |
626 |
exit; |
627 |
exit; |
627 |
} |
628 |
} |
628 |
|
629 |
|