strip bad chars from class-indexed data and remove mvr uppon metarecord remapping
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Nov 2005 22:00:47 +0000 (22:00 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Nov 2005 22:00:47 +0000 (22:00 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1982 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/WoRM.pm

index 165b180..79a13f5 100644 (file)
@@ -224,7 +224,7 @@ sub scrub_metabib_record {
                                OpenILS::Application::WoRM->storage_req(
                                        'open-ils.storage.direct.metabib.metarecord.remote_update',
                                        { id => $mr->id },
-                                       { master_record => $others->[0]->source }
+                                       { master_record => $others->[0]->source, mods => undef }
                                );
                        } else {
                                warn "Removing metarecord whose master is $rec";
@@ -514,6 +514,10 @@ sub class_all_index_string_xml {
 
                next unless $value;
 
+               $value =~ s/(\pM|\pC)//sgoe;
+               $value =~ s/[\x80-\xff]//sgoe;
+               $value = lc($value);
+
                my $fm = $class_constructor->new;
                $fm->value( $value );
                $fm->field( $xpathset->{$class}->{$type}->{id} );