View | Details | Raw Unified | Return to bug 21249
Collapse All | Expand All

(-)a/catalogue/search.pl (+19 lines)
Lines 399-404 if ( $params->{'multibranchlimit'} ) { Link Here
399
    }
399
    }
400
}
400
}
401
401
402
for ( my $i=0; $i<@limits; $i++ ) {
403
    if ( $limits[$i] =~ /^branch:/ ) {
404
        my $branchfield  = C4::Context->preference('SearchLimitLibrary');
405
        if ( $branchfield eq "homebranch" ) {
406
            $limits[$i] =~ s/branch/homebranch/;
407
        }
408
        elsif ( $branchfield eq "holdingbranch" ) {
409
            $limits[$i] =~ s/branch/holdingbranch/;
410
        }
411
        else {
412
            my $homebranchlimit = $limits[$i];
413
            my $holdingbranchlimit = $limits[$i];
414
            $homebranchlimit =~ s/branch/homebranch/;
415
            $holdingbranchlimit =~ s/branch/holdingbranch/;
416
            $limits[$i] = "$homebranchlimit or $holdingbranchlimit";
417
        }
418
    }
419
}
420
402
my $available;
421
my $available;
403
foreach my $limit(@limits) {
422
foreach my $limit(@limits) {
404
    if ($limit =~/available/) {
423
    if ($limit =~/available/) {
(-)a/opac/opac-search.pl (-1 / +19 lines)
Lines 505-510 if ( $params->{'multibranchlimit'} || ( $branch_group_limit && $branch_group_lim Link Here
505
    }
505
    }
506
}
506
}
507
507
508
for ( my $i=0; $i<@limits; $i++ ) {
509
    if ( $limits[$i] =~ /^branch:/ ) {
510
        my $branchfield  = C4::Context->preference('SearchLimitLibrary');
511
        if ( $branchfield eq "homebranch" ) {
512
            $limits[$i] =~ s/branch/homebranch/;
513
        }
514
        elsif ( $branchfield eq "holdingbranch" ) {
515
            $limits[$i] =~ s/branch/holdingbranch/;
516
        }
517
        else {
518
            my $homebranchlimit = $limits[$i];
519
            my $holdingbranchlimit = $limits[$i];
520
            $homebranchlimit =~ s/branch/homebranch/;
521
            $holdingbranchlimit =~ s/branch/holdingbranch/;
522
            $limits[$i] = "$homebranchlimit or $holdingbranchlimit";
523
        }
524
    }
525
}
526
508
my $available;
527
my $available;
509
foreach my $limit(@limits) {
528
foreach my $limit(@limits) {
510
    if ($limit =~/available/) {
529
    if ($limit =~/available/) {
511
- 

Return to bug 21249