[Koha] 2.2.8 - Z3950 returning only one incorrect result

Mike Dalgity dalgity at htl.net
Thu Mar 29 00:05:53 NZST 2007


Hi Chris, I agree I can't see any reason why I'm getting these "/"'s excpet
possibly a different perl module version or one with a bug maybe?  All
fields are blank on the addbiblio screen except isbn.

Forgot to mention that I'm seeing this problem because the isbn is replaced
by the issn as the search term in this section of code:
if ($isbn || $issn) {
                $attr='1=7';
                $term=$isbn if ($isbn);
                $term=$issn if ($issn);
        } elsif ($title) {
                $attr='1=4 ';
                $term=$title;
        } elsif ($author) {
                $attr='1=1003';
                $term=$author;
        }

taii :/-/-0842308245-/ at /var/www/koha/intranet/cgi-bin/z3950/search.pl
line 64.
taii :/-/-0842308245-/ at /var/www/koha/intranet/cgi-bin/z3950/search.pl
line 82.
isbn : 0842308245 at /var/www/koha/intranet/cgi-bin/z3950/search.pl line
107.
issn : / at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 108.
term : 0842308245 at /var/www/koha/intranet/cgi-bin/z3950/search.pl line
110.
term : / at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 112.
term : / at /var/www/koha/intranet/cgi-bin/z3950/search.pl line 120.
query @attr 1=7 / at /var/www/koha/intranet/cgi-bin/z3950/search.pl line
123.

You can see above that $term was briefly set to the isbn before being
replace by the "/" issn.  Since all my input parameters will be "/" if they
were left blank then an issn search would be the only one to succeed and all
other searches will just be searching for the term "/".

It's the following section of code that's assigning the "/"'s but I have no
idea why. Note that the isbn above doesn't have a "/" at the end so it only
occurs when the param is null. Does it depend on any perl modules? The
param's are passed through the url right? and the url only has an empty
oldbiblionumber and the isbn.
my $title = $input->param('title');
my $author = $input->param('author');
my $isbn = $input->param('isbn');
my $issn = $input->param('issn');


Thanks,
Mike D.


-----Original Message-----
From: Chris Cormack [mailto:chris at katipo.co.nz]
Sent: March 28, 2007 12:00 AM
To: Mike Dalgity
Cc: koha at lists.katipo.co.nz
Subject: Re: [Koha] 2.2.8 - Z3950 returning only one incorrect result



On 28/03/2007, at 3:21 PM, Mike Dalgity wrote:

> Hi, OK I found the cause of my Z39.50 search problem but I'm going
> to need
> someone with more Perl experience to help me out here.  I
> uncommented all
> the warn statements in cgi-bin/z3950/search.pl and added a few of
> my own to
> find the cause.  First off I've been searching only by ISBN and
> addbiblio.pl
> appears to build the URL correctly.
> http://172.16.1.153:8080/cgi-bin/koha/z3950/search.pl?
> oldbiblionumber=&isbn=
> 0842308245
>
> I noticed in the log that the isbn value is correct but the search
> term
> incorrectly has just a "/" like this:
>
Hi Mike

I can see no where in the code that it is being set to /. ISSN doesnt
have a / in it when you search or anything like that?


Chris




More information about the Koha mailing list