|
Lines 313-319
sub SimpleSearch {
Link Here
|
| 313 |
|
313 |
|
| 314 |
$koha_query, $simple_query, $sort_by_ref, $servers_ref, |
314 |
$koha_query, $simple_query, $sort_by_ref, $servers_ref, |
| 315 |
$results_per_page, $offset, $branches, $itemtypes, |
315 |
$results_per_page, $offset, $branches, $itemtypes, |
| 316 |
$query_type, $scan, $opac |
316 |
$query_type, $scan |
| 317 |
); |
317 |
); |
| 318 |
|
318 |
|
| 319 |
The all singing, all dancing, multi-server, asynchronous, scanning, |
319 |
The all singing, all dancing, multi-server, asynchronous, scanning, |
|
Lines 327-333
sub getRecords {
Link Here
|
| 327 |
my ( |
327 |
my ( |
| 328 |
$koha_query, $simple_query, $sort_by_ref, $servers_ref, |
328 |
$koha_query, $simple_query, $sort_by_ref, $servers_ref, |
| 329 |
$results_per_page, $offset, $branches, $itemtypes, |
329 |
$results_per_page, $offset, $branches, $itemtypes, |
| 330 |
$query_type, $scan, $opac |
330 |
$query_type, $scan |
| 331 |
) = @_; |
331 |
) = @_; |
| 332 |
|
332 |
|
| 333 |
my @servers = @$servers_ref; |
333 |
my @servers = @$servers_ref; |
|
Lines 343-348
sub getRecords {
Link Here
|
| 343 |
# TODO simplify this structure ( { branchcode => $branchname } is enought) and remove this parameter |
343 |
# TODO simplify this structure ( { branchcode => $branchname } is enought) and remove this parameter |
| 344 |
$branches ||= { map { $_->branchcode => { branchname => $_->branchname } } Koha::Libraries->search }; |
344 |
$branches ||= { map { $_->branchcode => { branchname => $_->branchname } } Koha::Libraries->search }; |
| 345 |
|
345 |
|
|
|
346 |
my $interface = C4::Context->interface; |
| 347 |
|
| 346 |
# Initialize variables for the faceted results objects |
348 |
# Initialize variables for the faceted results objects |
| 347 |
my $facets_counter = {}; |
349 |
my $facets_counter = {}; |
| 348 |
my $facets_info = {}; |
350 |
my $facets_info = {}; |
|
Lines 584-590
sub getRecords {
Link Here
|
| 584 |
$av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $one_facet }); |
586 |
$av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $one_facet }); |
| 585 |
} |
587 |
} |
| 586 |
|
588 |
|
| 587 |
if ($opac) { |
589 |
if ($interface eq 'opac') { |
| 588 |
$facet_label_value = $av->next->opac_description if $av && $av->count; |
590 |
$facet_label_value = $av->next->opac_description if $av && $av->count; |
| 589 |
} else { |
591 |
} else { |
| 590 |
$av = $av->next if $av && $av->count; |
592 |
$av = $av->next if $av && $av->count; |