From: dbs Date: Thu, 30 Sep 2010 02:59:50 +0000 (+0000) Subject: Merge r18076 from trunk: Make authority validation rules match authority ingest rules... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c7ea0c99ac341cc282616a121108b5cc4c02c3cc;p=evergreen%2Fjoelewis.git Merge r18076 from trunk: Make authority validation rules match authority ingest rules for better matches This resolves a problem in O:A:Storage:Publisher:authority:validate_tag() where the full NACO normalization rules that are applied to the subfields of the authority records when they are ingested into authority.full_rec are not similarly applied to the incoming subfields of the bib field that is being validated; only diacritic characters in the bib field subfields were being normalized. Now we apply naco_normalize() to the search terms so that they will match the ingested form of the authority record. git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@18108 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm index 3f5127c63c..62091ce7e0 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm @@ -33,11 +33,7 @@ sub validate_tag { for my $t ( @tags ) { for my $search ( @searches ) { my $sf = $$search{subfield}; - my $term = NFD(lc($$search{term})); - - $term =~ s/\pM+//sgo; - $term =~ s/\pC+//sgo; - $term =~ s/\W+$//o; + my $term = OpenILS::Application::Storage::FTS::naco_normalize($$search{term}, $sf); $tag = [$tag] if (!ref($tag));