bug 5243: avoid crash when saving authority records on certain setups
authorGalen Charlton <gmcharlt@gmail.com>
Thu, 28 Oct 2010 12:09:47 +0000 (08:09 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Tue, 2 Nov 2010 03:13:27 +0000 (16:13 +1300)
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>
C4/AuthoritiesMarc.pm

index b4a0d78..d07cca4 100644 (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]);