5 # Script for handling import of MARC data into Koha db
8 # Koha library project www.koha.org
10 # Licensed under the GPL
13 # Copyright 2000-2002 Katipo Communications
15 # This file is part of Koha.
17 # Koha is free software; you can redistribute it and/or modify it under the
18 # terms of the GNU General Public License as published by the Free Software
19 # Foundation; either version 2 of the License, or (at your option) any later
22 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
23 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
24 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
26 # You should have received a copy of the GNU General Public License along with
27 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
28 # Suite 330, Boston, MA 02111-1307 USA
32 # standard or CPAN modules used
42 use MARC::File::USMARC;
51 my $includes = C4::Context->config('includes') ||
52 "/usr/local/www/hdl/htdocs/includes";
54 # HTML colors for alternating lines
62 my $userid=$ENV{'REMOTE_USER'};
65 my $dbh = C4::Context->dbh;
67 my $uploadmarc=$input->param('uploadmarc');
68 my $overwrite_biblio = $input->param('overwrite_biblio');
69 my $filename = $input->param('filename');
70 my ($template, $loggedinuser, $cookie)
71 = get_template_and_user({template_name => "acqui.simple/marcimport.tmpl",
75 flagsrequired => {parameters => 1},
79 $template->param(SCRIPT_NAME => $ENV{'SCRIPT_NAME'},
80 uploadmarc => $uploadmarc);
81 if ($uploadmarc && length($uploadmarc)>0) {
83 while (<$uploadmarc>) {
86 my @marcarray = split /\x1D/, $marcrecord;
87 my $dbh = C4::Context->dbh;
88 my $searchisbn = $dbh->prepare("select biblioitemnumber from biblioitems where isbn=?");
89 my $searchissn = $dbh->prepare("select biblioitemnumber from biblioitems where issn=?");
90 my $searchbreeding = $dbh->prepare("select id from marc_breeding where isbn=?");
91 my $insertsql = $dbh->prepare("insert into marc_breeding (file,isbn,title,author,marc) values(?,?,?,?,?)");
92 my $replacesql = $dbh->prepare("update marc_breeding set file=?,isbn=?,title=?,author=?,marc=? where id=?");
93 # fields used for import results
96 my $alreadyinfarm = 0;
97 my $notmarcrecord = 0;
98 for (my $i=0;$i<=$#marcarray;$i++) {
99 my $marcrecord = MARC::File::USMARC::decode($marcarray[$i]."\x1D");
100 if (ref($marcrecord) eq undef) {
103 my $oldbiblio = MARCmarc2koha($dbh,$marcrecord);
104 $oldbiblio->{title} = char_decode($oldbiblio->{title});
105 $oldbiblio->{author} = char_decode($oldbiblio->{author});
106 # if isbn found and biblio does not exist, add it. If isbn found and biblio exists, overwrite or ignore depending on user choice
107 # drop every "special" char : spaces, - ...
108 $oldbiblio->{isbn} =~ s/ |-|\.//g,
109 # search if biblio exists
110 my $biblioitemnumber;
111 if ($oldbiblio->{isbn}) {
112 $searchisbn->execute($oldbiblio->{isbn});
113 ($biblioitemnumber) = $searchisbn->fetchrow;
115 $searchissn->execute($oldbiblio->{issn});
116 ($biblioitemnumber) = $searchissn->fetchrow;
118 if ($biblioitemnumber) {
121 # search in breeding farm
123 if ($oldbiblio->{isbn}) {
124 $searchbreeding->execute($oldbiblio->{isbn});
125 ($breedingid) = $searchbreeding->fetchrow;
127 $searchbreeding->execute($oldbiblio->{issn});
128 ($breedingid) = $searchbreeding->fetchrow;
130 if (!$breedingid || $overwrite_biblio) {
132 $recoded = $marcrecord->as_usmarc();
134 $replacesql ->execute($filename,substr($oldbiblio->{isbn}.$oldbiblio->{issn},0,10),$oldbiblio->{title},$oldbiblio->{author},$recoded,$breedingid);
136 $insertsql ->execute($filename,substr($oldbiblio->{isbn}.$oldbiblio->{issn},0,10),$oldbiblio->{title},$oldbiblio->{author},$recoded);
145 $template->param(imported => $imported,
146 alreadyindb => $alreadyindb,
147 alreadyinfarm => $alreadyinfarm,
148 notmarcrecord => $notmarcrecord,
149 total => $imported+$alreadyindb+$alreadyinfarm+$notmarcrecord,
154 print $input->header(
155 -type => guesstype($template->output),
161 # Process a MARC file : show list of records, of 1 record detail, if numrecord exists
163 # A MARC file has been specified; process it for review form
178 # See if a particular result item was specified
179 my $numrecord = $input->param('numrecord');
181 ProcessRecord($dbh,$input,$numrecord);
183 # No result item specified, list results
184 ListFileRecords($dbh,$input);
188 # show 1 record from the MARC file
190 my ($dbh, $input,$numrecord) = @_;
198 if ($file=~/Z-(\d+)/) {
200 my $resultsid=$input->param('resultsid');
201 my $sth=$dbh->prepare("select results from z3950results where id=$resultsid");
203 ($data) = $sth->fetchrow;
205 my $sth=$dbh->prepare("select marc from uploadedmarc where id=$file");
207 ($data) = $sth->fetchrow;
210 my $file=MARC::File::USMARC->indata ($data);
212 for (my $i=1;$i<$numrecord;$i++) {
213 $record = $file->next;
216 $oldkoha=MARCmarc2koha($dbh,$record);
218 my $template=gettemplate('marcimport/marcimportdetail.tmpl');
219 $oldkoha->{additionalauthors} =~ s/ \| /\n/g;
220 $oldkoha =~ s/\|/\n/g;
221 $template->param($oldkoha);
222 #---- build MARC array for template
224 my $tagmeaning = &MARCgettagslib($dbh,1);
225 my @fields = $record->fields();
228 foreach my $field (@fields) {
229 my @subfields=$field->subfields();
230 foreach my $subfieldcount (0..$#subfields) {
232 if ($lasttag== $field->tag()) {
233 $row_data{tagid} = "";
235 $row_data{tagid} = $field->tag();
237 $row_data{subfield} = $subfields[$subfieldcount][0];
238 $row_data{tagmean} = $tagmeaning->{$field->tag()}->{$subfields[$subfieldcount][0]};
239 $row_data{tagvalue}= $subfields[$subfieldcount][1];
242 $row_data{color} = $lc1;
245 $row_data{color} = $lc2;
247 push(@loop,\%row_data);
248 $lasttag=$field->tag();
251 $template->param(MARC => \@loop);
252 $template->param(numrecord => $numrecord);
253 $template->param(file => $data);
254 print "Content-Type: text/html\n\n", $template->output;
257 # lists all records from the MARC file
258 sub ListFileRecords {
263 $dbh, # FIXME - Unused argument
270 $data, # records in MARC file format
280 my ($numrecords,$resultsid,$data,$startdate,$enddate);
281 # FIXME - there's already a $data a few lines above.
283 $dbh = C4::Context->dbh;
285 my $template=gettemplate('marcimport/ListFileRecords.tmpl');
286 # File can be z3950 search query or uploaded MARC data
289 if (not $file=~/Z-(\d+)/) {
290 # This is a Marc upload
291 $sth=$dbh->prepare("select marc,name from uploadedmarc where id=$file");
293 ($data, $name) = $sth->fetchrow;
294 $template->param(IS_MARC => 1);
295 $template->param(recordsource => $name);
298 if ($file=~/Z-(\d+)/) {
299 # This is a z3950 search
300 $template->param(IS_Z3950 =>1);
301 my $id=$1; # search query id number
303 my $starttimer=time();
306 select z3950results.numrecords,z3950results.id,z3950results.results,
307 z3950results.startdate,z3950results.enddate,server
308 from z3950queue left outer join z3950results
309 on z3950queue.id=z3950results.queryid
310 where z3950queue.id=?
315 # loop through all servers in search results
316 while ( ($numrecords,$resultsid,$data,
317 $startdate,$enddate,$serverstring) = $sth->fetchrow ) {
318 my ($srvid, $server, $database, $auth) = split(/\//, $serverstring, 4);
320 my $srvname=&z3950servername($dbh,$srvid,"$server/$database");
321 $template->param(srvid => $srvid);
322 $template->param(srvname => $srvname);
324 my $startrecord=$input->param("ST-$srvid");
325 ($startrecord) || ($startrecord='0');
326 my $serverplaceholder='';
327 foreach ($input->param) {
328 (next) unless (/ST-(.+)/);
330 (next) if ($serverid eq $srvid);
331 my $place=$input->param("ST-$serverid");
332 $serverplaceholder.="\&ST-$serverid=$place";
335 $template->param(HAS_NUMRECORDS => 1);
338 if ($startrecord>0) {
339 $previous="<a href=".$ENV{'SCRIPT_NAME'}."?file=Z-$id&menu=z3950$serverplaceholder\&ST-$srvid=".($startrecord-10)."#SERVER-$srvid>Previous</a>";
342 $highest=$startrecord+10;
343 ($highest>$numrecords) && ($highest=$numrecords);
344 if ($numrecords>$startrecord+10) {
345 $next="<a href=".$ENV{'SCRIPT_NAME'}."?file=Z-$id&menu=z3950$serverplaceholder\&ST-$srvid=$highest#SERVER-$srvid>Next</a>";
347 $template->param(startrecord => $startrecord+1);
348 $template->param(highest => $highest);
349 $template->param(numrecords => $numrecords);
350 $template->param(previous => $previous);
351 $template->param(next => $next);
352 my $stj=$dbh->prepare("update z3950results
353 set highestseen=? where id=?");
354 $stj->execute($startrecord+10,$resultsid);
358 $template->param(PENDING => 1);
359 } elsif ($enddate == 0) {
361 my $elapsed=$now-$startdate;
364 $elapsedtime=sprintf "%d minutes",($elapsed/60);
366 $elapsedtime=sprintf "%d seconds",$elapsed;
368 $template->param(elapsedtime => $elapsedtime);
369 } elsif ($numrecords) {
371 my $z3950file=MARC::File::USMARC->indata ($data);
372 while (my $record=$z3950file->next) {
373 my $oldkoha = MARCmarc2koha($dbh,$record);
374 my %row = ResultRecordLink($dbh,$oldkoha,$resultsid);
377 $template->param(LINES => \@loop);
382 my $elapsed=time()-$starttimer;
383 # print "<hr>It took $elapsed seconds to process this page.\n";
385 $template->param(NO_RECORDS =>1);
386 $template->param(id => $id);
391 # This is an uploaded Marc record
394 my $MARCfile = MARC::File::USMARC->indata($data);
396 while (my $record=$MARCfile->next) {
398 my $oldkoha = MARCmarc2koha($dbh,$record);
399 my %row = ResultRecordLink($dbh,$oldkoha,'',$num);
402 $template->param(LINES => \@loop);
403 } # if z3950 or marc upload
404 print "Content-Type: text/html\n\n", $template->output;
405 } # sub ListFileRecords
409 sub ResultRecordLink {
411 my ($dbh,$oldkoha,$resultsid, $num)=@_; # input
412 # FIXME - $dbh as argument is no longer used
415 $bib, # hash ref to named fields
416 $searchfield, $searchvalue,
422 $dbh = C4::Context->dbh;
424 # $bib=extractmarcfields($record);
426 $sth=$dbh->prepare("select *
428 where (isbn=? and isbn!='') or (issn=? and issn!='') or (lccn=? and lccn!='') ");
429 $sth->execute($oldkoha->{isbn},$oldkoha->{issn},$oldkoha->{lccn});
435 ($oldkoha->{author}) && ($oldkoha->{author}="by $oldkoha->{author}");
438 foreach $fieldname ( "controlnumber", "lccn", "issn", "isbn") {
439 if ( defined $oldkoha->{$fieldname} && $oldkoha->{$fieldname} ) {
440 $searchfield=$fieldname;
441 $searchvalue=$oldkoha->{$fieldname};
442 } # if defined fieldname
444 if ( $searchfield ) {
445 $row{SCRIPT_NAME} = $ENV{'SCRIPT_NAME'};
446 $row{donetext} = $donetext;
448 # $row{resultsid} = $resultsid;
449 # $row{searchfield} = $searchfield;
450 # $row{searchvalue} = $searchvalue;
451 $row{numrecord} = $num;
452 $row{title} = $oldkoha->{title};
453 $row{author} = $oldkoha->{author};
455 $row{title} = "Error: Problem with <br>$bib->{title} $bib->{author}<br>";
458 } # sub PrintResultRecordLink
460 #---------------------------------
465 my ($dbh)=@_; # FIXME - Unused argument
467 $dbh = C4::Context->dbh;
469 my $template=gettemplate('marcimport/uploadmarc.tmpl');
470 $template->param(SCRIPT_NAME => $ENV{'SCRIPT_NAME'});
471 # print "<a href=$ENV{'SCRIPT_NAME'}>Main Menu</a><hr>\n";
472 my $sth=$dbh->prepare("select id,name from uploadedmarc");
474 # print "<h2>Select a set of MARC records</h2>\n<ul>";
476 while (my ($id, $name) = $sth->fetchrow) {
480 push(@marc_loop, \%row);
481 # print "<li><a href=$ENV{'SCRIPT_NAME'}?file=$id&menu=$menu>$name</a><br>\n";
483 $template->param(marc => \@marc_loop);
484 print "Content-Type: text/html\n\n", $template->output;
493 my $template=gettemplate('marcimport/mainmenu.tmpl');
494 $template->param(SCRIPT_NAME => $ENV{'SCRIPT_NAME'});
495 print "Content-Type: text/html\n\n", $template->output;
498 #---------------------------------------------
499 sub AcceptMarcUpload {
503 # FIXME - Unused argument
507 $dbh = C4::Context->dbh;
509 my $name=$input->param('name');
510 my $data=$input->param('uploadmarc');
513 ($name) || ($name=$data);
514 if (length($data)>0) {
519 my $q_marcrecord=$dbh->quote($marcrecord);
520 my $q_name=$dbh->quote($name);
521 my $sth=$dbh->prepare("insert into uploadedmarc
523 values ($q_marcrecord, $q_name)");
525 } # sub AcceptMarcUpload
527 #-------------------------------------------
528 sub AcceptBiblioitem {
531 $dbh, # FIXME - Unused argument
536 my $biblioitemnumber=0;
540 $dbh = C4::Context->dbh;
542 # my $isbn=$input->param('isbn');
543 # my $issn=$input->param('issn');
544 # my $lccn=$input->param('lccn');
545 # my $q_origisbn=$dbh->quote($input->param('origisbn'));
546 # my $q_origissn=$dbh->quote($input->param('origissn'));
547 # my $q_origlccn=$dbh->quote($input->param('origlccn'));
548 # my $q_origcontrolnumber=$dbh->quote($input->param('origcontrolnumber'));
549 my $title=$input->param('title');
551 # my $q_isbn=$dbh->quote((($isbn) || ('NIL')));
552 # my $q_issn=$dbh->quote((($issn) || ('NIL')));
553 # my $q_lccn=$dbh->quote((($lccn) || ('NIL')));
554 my $file= MARC::File::USMARC->indata($input->param('file'));
555 my $numrecord = $input->param('numrecord');
557 for (my $i=1;$i<$numrecord;$i++) {
561 print STDERR "Error in marcimport.pl/Acceptbiblioitem : numrecord not defined\n";
562 print "Error in marcimport.pl/Acceptbiblioitem : numrecord not defined : contact administrator\n";
564 my $template=gettemplate('marcimport/AcceptBiblioitem.tmpl');
566 my $oldkoha = MARCmarc2koha($dbh,$record);
567 # See if it already exists
568 # FIXME - There's already a $sth in this context.
569 my $sth=$dbh->prepare("select biblionumber,biblioitemnumber
571 where isbn=? or issn=? or lccn=?");
572 $sth->execute($oldkoha->{isbn},$oldkoha->{issn},$oldkoha->{lccn});
576 ($biblionumber, $biblioitemnumber) = $sth->fetchrow;
577 $template->param(title => $title);
578 $template->param(biblionumber => $biblionumber);
579 $template->param(biblioitemnumber => $biblioitemnumber);
580 $template->param(BIBLIO_EXISTS => 1);
583 # It doesn't exist; add it.
589 # convert to upper case and split on lines
590 my $subjectheadings=$input->param('subject');
591 my @subjectheadings=split(/[\r\n]+/,$subjectheadings);
593 my $additionalauthors=$input->param('additionalauthors');
594 my @additionalauthors=split(/[\r\n]+|\|/,uc($additionalauthors));
595 # FIXME - WTF are the additional authors
596 # converted to upper case?
598 # Use individual assignments to hash buckets, in case
599 # any of the input parameters are empty or don't exist
600 $biblio{title} =$input->param('title');
601 $biblio{author} =$input->param('author');
602 $biblio{copyright} =$input->param('copyrightdate');
603 $biblio{seriestitle} =$input->param('seriestitle');
604 $biblio{notes} =$input->param('notes');
605 $biblio{abstract} =$input->param('abstract');
606 $biblio{subtitle} =$input->param('subtitle');
608 $biblioitem{volume} =$input->param('volume');
609 $biblioitem{number} =$input->param('number');
610 $biblioitem{itemtype} =$input->param('itemtype');
611 $biblioitem{isbn} =$input->param('isbn');
612 $biblioitem{issn} =$input->param('issn');
613 $biblioitem{dewey} =$input->param('dewey');
614 $biblioitem{subclass} =$input->param('subclass');
615 $biblioitem{publicationyear} =$input->param('publicationyear');
616 $biblioitem{publishercode} =$input->param('publishercode');
617 $biblioitem{volumedate} =$input->param('volumedate');
618 $biblioitem{volumeddesc} =$input->param('volumeddesc');
619 $biblioitem{illus} =$input->param('illustrator');
620 $biblioitem{pages} =$input->param('pages');
621 $biblioitem{notes} =$input->param('notes');
622 $biblioitem{size} =$input->param('size');
623 $biblioitem{place} =$input->param('place');
624 $biblioitem{lccn} =$input->param('lccn');
625 $biblioitem{marc} =$input->param('marc');
626 # print STDERR $record->as_formatted();
628 ($biblionumber, $biblioitemnumber, $error)=
629 ALLnewbiblio($dbh,$record,\%biblio,\%biblioitem);
631 # newcompletebiblioitem($dbh,
635 # \@additionalauthors
639 print "<H2>Error adding biblio item</H2> $error\n";
641 $template->param(title => $title);
642 $template->param(biblionumber => $biblionumber);
643 $template->param(biblioitemnumber => $biblioitemnumber);
644 $template->param(BIBLIO_CREATE => 1);
649 # Get next barcode, or pick random one if none exist yet
650 $sth=$dbh->prepare("select max(barcode) from items");
652 ($barcode) = $sth->fetchrow;
655 $barcode=int(rand()*1000000);
657 my $branchselect=getkeytableselectoptions(
658 $dbh, 'branches', 'branchcode', 'branchname', 0);
659 $template->param(barcode => $barcode);
660 $template->param(branchselect => $branchselect);
661 print "Content-Type: text/html\n\n", $template->output;
665 #---------------------------------------
666 # Accept form data to add an item copy
669 my ( $dbh, $input )=@_;
670 # FIXME - $dbh argument unused
672 my $template=gettemplate('marcimport/AcceptItemCopy.tmpl');
676 $dbh = C4::Context->dbh;
678 my $barcode=$input->param('barcode');
679 my $replacementprice=($input->param('replacementprice') || 0);
681 my $sth=$dbh->prepare("select barcode
684 $sth->execute($barcode);
686 $template->param(BARCODE_EXISTS => 1);
687 $template->param(barcode => $barcode);
689 # Insert new item into database
690 $error=&ALLnewitem($dbh,
691 { biblionumber=> $input->param('biblionumber'),
692 biblioitemnumber=> $input->param('biblioitemnumber'),
693 itemnotes=> $input->param('notes'),
694 homebranch=> $input->param('homebranch'),
695 replacementprice=> $replacementprice,
700 $template->param(ITEM_ERROR => 1);
701 $template->param(error => $error);
703 $template->param(ITEM_CREATED => 1);
704 $template->param(barcode => $barcode);
706 } # if barcode exists
707 print "Content-Type: text/html\n\n", $template->output;
708 } # sub AcceptItemCopy
710 #---------------------------------------
716 $fields, # list ref to MARC fields
727 $subfieldcode,$subfieldvalue,
732 #-----------------------------------------
734 $marctext="<table border=0 cellspacing=1>
735 <tr><th colspan=4 background=/images/background-acq.gif>
739 foreach $field ( @$fields ) {
741 # Swap colors on alternating lines
742 ($color eq $lc1) ? ($color=$lc2) : ($color=$lc1);
744 $tag=$field->{'tag'};
745 $label=taglabel($tag);
747 if ( $tag eq 'LDR' ) {
751 print "<pre>Format tag=$tag label=$label</pre>\n" if $debug;
753 $marctext.="<tr><td bgcolor=$color valign=top>$label</td> \n" .
754 "<td bgcolor=$color valign=top>$tag</td> \n";
756 $indicator=$field->{'indicator'};
757 $indicator=~s/ +$//; # drop trailing blanks
759 # Third table column has indicator if it is short.
760 # Fourth column has embedded table of subfields, and indicator
761 # if it is long (leader or fixed-position fields)
763 print "<pre>Format indicator=$indicator" .
764 " length=" . length( $indicator ) . "</pre>\n" if $debug;
765 if ( length( $indicator <= 3 ) ) {
766 $marctext.="<td bgcolor=$color valign=top><pre>" .
767 "$indicator</pre></td>" .
768 "<td bgcolor=$color valign=top>" ;
770 $marctext.="<td bgcolor=$color valign=top></td>" .
771 "<td bgcolor=$color valign=top>" .
776 if ( $field->{'subfields'} ) {
777 # start another table for subfields
778 $marctext.= "<table border=0 cellspacing=2>\n";
779 foreach $subfieldcode ( sort( keys %{ $field->{'subfields'} } )) {
780 $subfieldvalue=$field->{'subfields'}->{$subfieldcode};
781 if (ref($subfieldvalue) eq 'ARRAY' ) {
782 # if it's a pointer to array, get all the values
783 @values=@{$subfieldvalue};
785 # otherwise get the one value
786 @values=( $subfieldvalue );
787 } # if subfield array
788 foreach $value ( @values ) {
789 $marctext.="<tr><td><strong>$subfieldcode</strong></td>" .
790 "<td>$value</td></tr>\n";
793 $marctext.="</table>\n";
795 # End of indicator and subfields column
796 $marctext.="</td>\n";
799 $marctext.="</tr>\n";
803 $marctext.="</table>\n";
807 } # sub FormatMarcText
811 # log cleared, as marcimport is (almost) rewritten from scratch.
813 # Revision 1.28 2003/01/28 15:00:31 tipaul
814 # user can now search in breeding farm with isbn/issn or title. Title/name are stored in breeding farm and showed when a search is done
816 # Revision 1.27 2003/01/26 23:21:49 acli
817 # Handle non-latin1 charsets
819 # Revision 1.26 2003/01/23 12:26:41 tipaul
820 # upgrading import in breeding farm (you can now search on ISBN or on title) AND character encoding.
822 # Revision 1.25 2003/01/21 08:13:50 tipaul
823 # character encoding ISO646 => 8859-1, first draft
825 # Revision 1.24 2003/01/14 16:41:17 tipaul
826 # bugfix : use gettemplate_and_user instead of gettemplate.
827 # fix a blank screen in 1.3.3 in "import in breeding farm"
829 # Revision 1.23 2003/01/06 13:06:28 tipaul
830 # removing trailing #
832 # Revision 1.22 2002/11/12 15:58:43 tipaul
835 # * adding value_builder : you can map a subfield in the marc_subfield_structure to a sub stored in "value_builder" directory. In this directory you can create screen used to build values with any method. In this commit is a 1st draft of the builder for 100$a unimarc french subfield, which is composed of 35 digits, with 12 differents values (only the 4th first are provided for instance)
837 # Revision 1.21 2002/10/22 15:50:23 tipaul
838 # road to 1.3.2 : adding a biblio in MARC format.
839 # seems to work a few.
841 # * manage html checks (mandatory subfields...)
842 # * add list of acceptable values (authorities)
843 # * manage ## in MARC format
844 # * manage correctly repeatable fields
845 # and probably a LOT of bugfixes
847 # Revision 1.20 2002/10/16 12:46:19 arensb
848 # Added a FIXME comment.
850 # Revision 1.19 2002/10/15 10:14:44 tipaul
851 # road to 1.3.2. Full rewrite of marcimport.pl.
852 # The acquisition system in MARC version will work like this :
853 # * marcimport will put marc records into a "breeding farm" table.
854 # * when the user want to add a biblio, he enters first the ISBN/ISSN of the biblio. koha searches into breeding farm and if the record exists, it is shown to the user to help him adding the biblio. When the biblio is added, it's deleted from the breeding farm.
857 # * modify acqui.simple home page (addbooks.pl)
858 # * adds import into breeding farm
861 # * z3950 functionnality is dropped from "marcimport" will be added somewhere else.
862 # * templates are in a new acqui.simple sub directory, and the marcimport template directory will become obsolete soon.I think this is more logic