[Koha-cvs] koha/z3950 search.pl [dev_week]
Ryan Higgins
rch at liblime.com
Sun Mar 25 01:10:30 CET 2007
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Ryan Higgins <rych> 07/03/25 00:10:30
Modified files:
z3950 : search.pl
Log message:
fix tabs, removed encoding check-> Breeding::ImportBreeding()
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/search.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.3.2.6.2.5&r2=1.3.2.6.2.6
Patches:
Index: search.pl
===================================================================
RCS file: /sources/koha/koha/z3950/Attic/search.pl,v
retrieving revision 1.3.2.6.2.5
retrieving revision 1.3.2.6.2.6
diff -u -b -r1.3.2.6.2.5 -r1.3.2.6.2.6
--- search.pl 23 Mar 2007 20:58:16 -0000 1.3.2.6.2.5
+++ search.pl 25 Mar 2007 00:10:30 -0000 1.3.2.6.2.6
@@ -148,7 +148,7 @@
my $event;
while (($k = ZOOM::event(\@oConnection)) != 0) {
$event = $oConnection[$k-1]->last_event();
- warn ("connection ", $k-1, ": event $event (", ZOOM::event_str($event), ")\n");
+# warn ("connection ", $k-1, ": event $event (", ZOOM::event_str($event), ")\n");
last if $event == ZOOM::Event::ZEND;
}
@@ -171,19 +171,6 @@
my $marcrecord;
$marcdata = $rec->raw();
$marcrecord = MARC::File::USMARC::decode($marcdata);
- my $xmlrecord = $marcrecord->as_xml;
- my $newmarcrecord;
- eval {
- $newmarcrecord = MARC::Record::new_from_xml($xmlrecord,'UTF-8');
- };
- if ($@) {
- warn "MARC from Z3950 has a problem:";
- warn DUMP $xmlrecord;
- warn DUMP2 $newmarcrecord->as_usmarc();
- warn $@;
- next;
- }
- my $recordstring = $newmarcrecord->as_usmarc();
####WARNING records coming from Z3950 clients are in various character sets MARC8,UTF8,UNIMARC etc
## In HEAD i change everything to UTF-8
# In rel2_2 i am not sure what encoding is so no character conversion is done here
@@ -191,12 +178,12 @@
my $oldbiblio = MARCmarc2koha($dbh,$marcrecord,"");
$oldbiblio->{isbn} =~ s/ |-|\.//g,
$oldbiblio->{issn} =~ s/ |-|\.//g,
- my ($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported,$bid)=ImportBreeding($recordstring,1,$serverhost[$k],$encoding[$k],$random);
+
+ my ($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported,$bid)=ImportBreeding($marcdata,1,$serverhost[$k],$encoding[$k],$random);
my $warnings;
- $warnings = "Invalid MARC record" if ($notmarcrecord);
- $warnings .= "\nThis record already exists in catalog" if ($alreadyindb);
+ $warnings = "This record already exists in catalog" if ($alreadyindb);
+ $warnings = "\nInvalid MARC record" if ($notmarcrecord);
$warnings .= "\nThis record already exists in reservoir" if ($alreadyinfarm);
-
my %row_data;
if ($i % 2) {
$toggle="#ffffcc";
More information about the Koha-cvs
mailing list