## This is just an index scan
if ($scan) {
my ( $term, $occ ) = $results[ $i - 1 ]->term($j);
-
# here we create a minimal MARC record and hand it off to the
# template just like a normal result ... perhaps not ideal, but
# it works for now
$tmprecord->encoding('UTF-8');
my $tmptitle;
- # srote the minimal record in author/title (depending on MARC flavour)
+ # srote the minimal record in author/title (depending on MARC flavour)
if ( C4::Context->preference("marcflavour") eq
"UNIMARC" )
{
warn "QUERY BEFORE LIMITS: >$query<" if $DEBUG;
# add limits
+ my $group_OR_limits;
foreach my $this_limit (@limits) {
if ( $this_limit =~ /available/ ) {
# FIXME: switch to zebra search for null values
}
# these are treated as OR
elsif ( $this_limit =~ /mc/ ) {
- $limit .= " or $this_limit";
+ $group_OR_limits .= " or " if $group_OR_limits;
+ $group_OR_limits .= "$this_limit";
$limit_cgi .="&limit=$this_limit";
$limit_desc .= " or $this_limit";
}
else {
- $limit .= " and $this_limit";
+ $limit .= " and " if $limit || $query;
+ $limit .= "$this_limit";
$limit_cgi .="&limit=$this_limit";
$limit_desc .=" and $this_limit";
}
}
-
+ $limit.=" and " if ($query && $limit);
+ $limit.="($group_OR_limits)" if $group_OR_limits;
# normalize the strings
for ($query, $query_search_desc, $limit, $limit_desc) {
$_ =~ s/ / /g; # remove extra spaces
# kit, computer database,
# computer file.
Material-type 1=1031
-#itemtype Material-type
#collection Material-type
-collection-code Material-type
-mt Material-type
-mc-collection Material-type
+#collection-code Material-type
+#mt Material-type
+#mc-collection Material-type
#dt-lh Material-type
#Music-key 1025 A statement of the key in $r in the following:
uri 1=8028
replacementprice 1=8029
replacementpricedate 1=8030
-
+itype 1=8031
+mc itype
# Publisher Location
Place-publication 1=59
popularity 1=issues
# Material Category
-mc 1=8700
+#mc 1=8700
## TYPE LIMITS
dt-bks 1=8700
dt-vis 1=8700
<!--TMPL_LOOP Name="itemtypeloop"-->
<td>
<!-- TMPL_IF name="imageurl"--><img border="0" src="<!--TMPL_VAR Name="imageurl" -->" alt="<!--TMPL_VAR Name="description" -->" /><!-- /TMPL_IF -->
- <input type="checkbox" id="mt-<!--TMPL_VAR Name="number" -->" name="limit" value="mt:<!--TMPL_VAR Name="code" -->" />
+ <input type="checkbox" id="mc-<!--TMPL_VAR Name="number" -->" name="limit" value="mc:<!--TMPL_VAR Name="code" -->" />
<!--TMPL_VAR Name="description" --></td>
<!-- TMPL_UNLESS name="count5" --></tr><tr><!-- /TMPL_UNLESS -->
<!--/TMPL_LOOP-->