Lines 1472-1483
sub buildQuery {
Link Here
|
1472 |
$limit_cgi .= "&limit=" . uri_escape_utf8($this_limit); |
1472 |
$limit_cgi .= "&limit=" . uri_escape_utf8($this_limit); |
1473 |
$limit_desc .= " $this_limit"; |
1473 |
$limit_desc .= " $this_limit"; |
1474 |
} |
1474 |
} |
1475 |
elsif ( $this_limit =~ 'multibranchlimit|^branch' ) { |
1475 |
elsif ( $this_limit =~ '^multibranchlimit:|^branch:' ) { |
1476 |
$limit_cgi .= "&limit=" . uri_escape_utf8($this_limit); |
1476 |
$limit_cgi .= "&limit=" . uri_escape_utf8($this_limit); |
1477 |
$limit .= " and " if $limit || $query; |
1477 |
$limit .= " and " if $limit || $query; |
1478 |
my $branchfield = C4::Context->preference('SearchLimitLibrary'); |
1478 |
my $branchfield = C4::Context->preference('SearchLimitLibrary'); |
1479 |
my @branchcodes; |
1479 |
my @branchcodes; |
1480 |
if( $this_limit =~ 'multibranchlimit' ){ |
1480 |
if( $this_limit =~ '^multibranchlimit:' ){ |
1481 |
my ($group_id) = ( $this_limit =~ /^multibranchlimit:(.*)$/ ); |
1481 |
my ($group_id) = ( $this_limit =~ /^multibranchlimit:(.*)$/ ); |
1482 |
my $search_group = Koha::Library::Groups->find( $group_id ); |
1482 |
my $search_group = Koha::Library::Groups->find( $group_id ); |
1483 |
@branchcodes = map { $_->branchcode } $search_group->all_libraries; |
1483 |
@branchcodes = map { $_->branchcode } $search_group->all_libraries; |
Lines 1508-1524
sub buildQuery {
Link Here
|
1508 |
$limit .= " and " if $limit || $query; |
1508 |
$limit .= " and " if $limit || $query; |
1509 |
$limit .= "$this_limit"; |
1509 |
$limit .= "$this_limit"; |
1510 |
$limit_cgi .= "&limit=" . uri_escape_utf8($this_limit); |
1510 |
$limit_cgi .= "&limit=" . uri_escape_utf8($this_limit); |
1511 |
if ($this_limit =~ /^branch:(.+)/) { |
1511 |
$limit_desc .= " $this_limit"; |
1512 |
my $branchcode = $1; |
|
|
1513 |
my $library = Koha::Libraries->find( $branchcode ); |
1514 |
if (defined $library) { |
1515 |
$limit_desc .= " branch:" . $library->branchname; |
1516 |
} else { |
1517 |
$limit_desc .= " $this_limit"; |
1518 |
} |
1519 |
} else { |
1520 |
$limit_desc .= " $this_limit"; |
1521 |
} |
1522 |
} |
1512 |
} |
1523 |
} |
1513 |
} |
1524 |
foreach my $k (keys (%group_OR_limits)) { |
1514 |
foreach my $k (keys (%group_OR_limits)) { |
1525 |
- |
|
|