Then we need to remove the "available" part from the query.
They are really awkward patches...
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
# this happens when selecting a subject on the opac-detail page
@limits = grep {!/^$/} @limits;
my $original_q = $q; # without available part
+ unless ( grep { /^available$/ } @limits ) {
+ $q =~ s| and \( \( allrecords,AlwaysMatches:'' not onloan,AlwaysMatches:''\) and \(lost,st-numeric=0\) \)||;
+ $original_q = $q;
+ }
if ( @limits ) {
if ( grep { /^available$/ } @limits ) {
$q .= q| and ( ( allrecords,AlwaysMatches:'' not onloan,AlwaysMatches:'') and (lost,st-numeric=0) )|;