[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 SearchMarc.pm
From: |
paul poulain |
Subject: |
[Koha-cvs] koha/C4 SearchMarc.pm |
Date: |
Tue, 14 Feb 2006 10:54:02 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch:
Changes by: paul poulain <address@hidden> 06/02/14 10:54:02
Modified files:
C4 : SearchMarc.pm
Log message:
fixing bugs for :
* search on 2 words "applied chaos"
* retrieve results when there's only 1 answer
(still dirty & to be rewritten by chris, but it's useful for me)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/SearchMarc.pm.diff?tr1=1.53&tr2=1.54&r1=text&r2=text
Patches:
Index: koha/C4/SearchMarc.pm
diff -u koha/C4/SearchMarc.pm:1.53 koha/C4/SearchMarc.pm:1.54
--- koha/C4/SearchMarc.pm:1.53 Mon Feb 13 23:52:04 2006
+++ koha/C4/SearchMarc.pm Tue Feb 14 10:54:02 2006
@@ -223,9 +223,9 @@
$query .= " and " if ($query);
my $field = $tagslib->{$tag}->{$subfield}->{kohafield};
if ($field eq 'biblio.author') {
- $query .= "Author= "address@hidden;
+ $query .= "Author= \""address@hidden"\"";
} elsif ($field eq 'biblio.title') {
- $query .= "Title= "address@hidden;
+ $query .= "Title= \""address@hidden"\"";
} elsif ($field eq 'biblioitems.isbn') {
$query .= "Isbn= "address@hidden;
} else {
@@ -260,8 +260,8 @@
my $totalitems=0;
$offset=0 unless $offset;
# calculate max offset
- my $maxrecordnum =
$offset+$length<$numresults?$offset+$length:$numresults;
- for (my $i=$offset; $i < $maxrecordnum; $i++) {
+ my $maxrecordnum =
$offset+$length<$numresults?$offset+$length:($numresults);
+ for (my $i=$offset-1; $i <= $maxrecordnum-1; $i++) {
# get the MARC record (in XML)...
# warn "REC $i = ".$rs->record($i)->raw();
# FIXME : it's a silly way to do things : XML => MARC::Record => hash. We had
better developping a XML=> hash (in biblio.pm)