bug 5243: avoid crash when saving authority records on certain setups

This does not seem to occur on all platforms - C4::Search
exports SimpleSearch() by default - but adding the 'C4::Search::'
qualifier certainly doesn't hurt things.

Patch by Fridolyn Somers <fridolyn.somers@gmail.com>

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Galen Charlton 2010-10-28 08:09:47 -04:00 committed by Chris Cormack
parent 5fa376542d
commit 9bd16d23b2

View file

@ -901,7 +901,7 @@ sub FindDuplicateAuthority {
$_->[1]=~s/$filtervalues/ /g; $query.= " and he,wrdl=\"".$_->[1]."\"" if ($_->[0]=~/[A-z]/);
}
}
my ($error, $results, $total_hits)=SimpleSearch( $query, 0, 1, [ "authorityserver" ] );
my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] );
# there is at least 1 result => return the 1st one
if (@$results>0) {
my $marcrecord = MARC::File::USMARC::decode($results->[0]);