From afe642bc5233bb316537558351bc26e49bff7a9c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 16 Oct 2007 16:02:37 -0500 Subject: [PATCH] fix for bug 1499 - normalize ISBN before dupe check Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Search.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/C4/Search.pm b/C4/Search.pm index 49bc72a592..3242634399 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -101,6 +101,11 @@ sub FindDuplicate { my ( $biblionumber, $title ); # search duplicate on ISBN, easy and fast.. + # ... normalize first + if ( $result->{isbn} ) { + $result->{isbn} =~ s/\(.*$//; + $result->{isbn} =~ s/\s+$//; + } #$search->{'avoidquerylog'}=1; if ( $result->{isbn} ) { $query = "isbn=$result->{isbn}"; -- 2.39.5