koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/z3950 processz3950queue,1.4,1.5 search.pl,1.1,1.2


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/z3950 processz3950queue,1.4,1.5 search.pl,1.1,1.2
Date: Mon, 23 Jun 2003 04:28:55 -0700

Update of /cvsroot/koha/koha/z3950
In directory sc8-pr-cvs1:/tmp/cvs-serv7625/z3950

Modified Files:
        processz3950queue search.pl 
Log Message:
adding isbn/author/title support (forgot to commit those...)

Index: processz3950queue
===================================================================
RCS file: /cvsroot/koha/koha/z3950/processz3950queue,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** processz3950queue   29 Apr 2003 16:48:25 -0000      1.4
--- processz3950queue   23 Jun 2003 11:28:52 -0000      1.5
***************
*** 155,159 ****
                                                        } else {
                                                                warn 
"$globalname ==> $globalsyntax";
!                                                               eval { 
$conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC);} if 
($globalsyntax eq "USMARC");
                                                                eval { 
$conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::UNIMARC);} if 
($globalsyntax eq "UNIMARC");
                                                                if ($@) {
--- 155,160 ----
                                                        } else {
                                                                warn 
"$globalname ==> $globalsyntax";
!                                                               eval 
{$conn->option(elementSetName => 'F')};
!                                                               eval { 
$conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::USMARC);} if 
($globalsyntax eq "USMARC");
                                                                eval { 
$conn->option(preferredRecordSyntax => Net::Z3950::RecordSyntax::UNIMARC);} if 
($globalsyntax eq "UNIMARC");
                                                                if ($@) {

Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/z3950/search.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** search.pl   29 Apr 2003 16:50:49 -0000      1.1
--- search.pl   23 Jun 2003 11:28:53 -0000      1.2
***************
*** 40,43 ****
--- 40,44 ----
  my $bibid=$input->param('bibid');
  my $title = $input->param('title');
+ my $author = $input->param('author');
  my $isbn = $input->param('isbn');
  my $issn = $input->param('issn');
***************
*** 49,64 ****
  my $record;
  my $oldbiblio;
! if ($bibid) {
        $record = MARCgetbiblio($dbh,$bibid);
        $oldbiblio = MARCmarc2koha($dbh,$record);
  }
- $isbn = $oldbiblio->{'isbn'};
- $issn = $oldbiblio->{'issn'};
- $title = $oldbiblio->{'title'};
  my $errmsg;
  unless ($random) { # if random is a parameter => we're just waiting for the 
search to end, it's a refresh.
        if ($isbn) {
                $random =rand(1000000000);
                $errmsg = addz3950queue($isbn, "isbn", $random, 'CHECKED');
        }
  }
--- 50,73 ----
  my $record;
  my $oldbiblio;
! warn "search.pl : $bibid / $title / $author / $isbn";
! if ($bibid > 0) {
        $record = MARCgetbiblio($dbh,$bibid);
        $oldbiblio = MARCmarc2koha($dbh,$record);
  }
  my $errmsg;
  unless ($random) { # if random is a parameter => we're just waiting for the 
search to end, it's a refresh.
+ warn "NO RANDOM";
        if ($isbn) {
+       warn "ADD ISBN $isbn";
                $random =rand(1000000000);
                $errmsg = addz3950queue($isbn, "isbn", $random, 'CHECKED');
+       } elsif ($author) {
+       warn "ADD AUTHOR $author";
+               $random =rand(1000000000);
+               $errmsg = addz3950queue($author, "author", $random, 'CHECKED');
+       } elsif ($title) {
+       warn "ADD TITLE : $title";
+               $random =rand(1000000000);
+               $errmsg = addz3950queue($title, "title", $random, 'CHECKED');
        }
  }
***************
*** 94,97 ****
--- 103,107 ----
  $template->param(isbn => $isbn,
                                                title => $title,
+                                               author => $author,
                                                breeding_loop => address@hidden,
                                                refresh => ($numberpending eq 0 
? 0 : "search.pl?bibid=$bibid&random=$random"),




reply via email to

[Prev in Thread] Current Thread [Next in Thread]