use C4::Branch;
use C4::Reserves; # CheckReserves
use C4::Debug;
-use C4::Items;
use C4::Charset;
use YAML;
use URI::Escape;
# set the version for version checking
BEGIN {
- $VERSION = 3.01;
+ $VERSION = 3.07.00.049;
$DEBUG = ($ENV{DEBUG}) ? 1 : 0;
}
$weighted_query .=
"Title-cover,ext,r1=\"$operand\""; # exact title-cover
$weighted_query .= " or ti,ext,r2=\"$operand\""; # exact title
- $weighted_query .= " or ti,phr,r3=\"$operand\""; # phrase title
+ $weighted_query .= " or Title-cover,phr,r3=\"$operand\""; # phrase title
#$weighted_query .= " or any,ext,r4=$operand"; # exact any
#$weighted_query .=" or kw,wrdl,r5=\"$operand\""; # word list any
$weighted_query .= " or wrdl,fuzzy,r8=\"$operand\""
my $dbh = C4::Context->dbh;
my @newresults;
+ require C4::Items;
+
$search_context = 'opac' if !$search_context || $search_context ne 'intranet';
my ($is_opac, $hidelostitems);
if ($search_context eq 'opac') {
# Hidden items
if ($is_opac) {
- my @hi = GetHiddenItemnumbers($item);
- $item->{'hideatopac'} = @hi;
- push @hiddenitems, @hi;
+ my @hi = C4::Items::GetHiddenItemnumbers($item);
+ $item->{'hideatopac'} = @hi;
+ push @hiddenitems, @hi;
}
my $hbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'homebranch' : 'holdingbranch';
}
$other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
$other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
- $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value;
+ $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan};
$other_items->{$key}->{count}++ if $item->{$hbranch};
$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
$other_items->{$key}->{description} = $item->{description};