[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 SearchMarc.pm [rel_2_2]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha/C4 SearchMarc.pm [rel_2_2] |
Date: |
Tue, 25 Jul 2006 12:32:38 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: paul poulain <tipaul> 06/07/25 12:32:38
Modified files:
C4 : SearchMarc.pm
Log message:
- fixing a minor problem in item counter
- quoting correctly some datas
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/SearchMarc.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.36.2.31&r2=1.36.2.32
Patches:
Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.36.2.31
retrieving revision 1.36.2.32
diff -u -b -r1.36.2.31 -r1.36.2.32
--- SearchMarc.pm 7 Jul 2006 21:26:24 -0000 1.36.2.31
+++ SearchMarc.pm 25 Jul 2006 12:32:38 -0000 1.36.2.32
@@ -454,8 +454,8 @@
}
$lineCN{date_due} = format_date($date_due) ;
$lineCN{notforloan} = $notforloanstatus{$item->{notforloan}} if
($item->{notforloan}); # setting not forloan it this item is not for loan
- $notforloan=0 unless ($item->{notforloan} or $item->{wthdrawn}
or $item->{itemlost});
}
+ $notforloan=0 unless ($item->{notforloan} or $item->{wthdrawn} or
$item->{itemlost});
$lineCN{notforloan} =
$notforloanstatus{$line->{notforloan}} if ($line->{notforloan} and not
$lineCN{notforloan}); # setting not forloan if itemtype is not for loan
push @CNresults,\%lineCN;
$totalitems+=$item->{cnt};
@@ -514,6 +514,7 @@
$sql_tables .= "marc_subfield_table as
m$nb_table,";
$sql_where1 .= "(m1.subfieldvalue like
".$dbh->quote("@$value[$i]%");
if (@$tags[$i]) {
+ @$tags[$i] = $dbh->quote(@$tags[$i]) unless
@$tags[$i]=~ /^'/;
$sql_where1 .=" and
concat(m1.tag,m1.subfieldcode) in (@$tags[$i])";
}
$sql_where1.=")";
@@ -521,6 +522,7 @@
$sql_tables .= "marc_word as
m$nb_table,";
$sql_where1 .= "(m1.word like
".$dbh->quote("@$value[$i]");
if (@$tags[$i]) {
+ @$tags[$i] = $dbh->quote(@$tags[$i]) unless
@$tags[$i]=~ /^'/;
$sql_where1 .=" and
m1.tagsubfield in (@$tags[$i])";
}
$sql_where1.=")";
@@ -528,6 +530,7 @@
$sql_tables .= "marc_subfield_table as
m$nb_table,";
$sql_where1 .= "(m1.subfieldvalue
@$operator[$i] ".$dbh->quote("@$value[$i]");
if (@$tags[$i]) {
+ @$tags[$i] = $dbh->quote(@$tags[$i]) unless
@$tags[$i]=~ /^'/;
$sql_where1 .=" and
concat(m1.tag,m1.subfieldcode) in (@$tags[$i])";
}
$sql_where1.=")";
@@ -538,6 +541,7 @@
$sql_tables .= "marc_subfield_table as
m$nb_table,";
$sql_where1 .= "@$and_or[$i]
(m$nb_table.subfieldvalue like ".$dbh->quote("@$value[$i]%");
if (@$tags[$i]) {
+ @$tags[$i] = $dbh->quote(@$tags[$i]) unless
@$tags[$i]=~ /^'/;
$sql_where1 .=" and
concat(m$nb_table.tag,m$nb_table.subfieldcode) in (@$tags[$i])";
}
$sql_where1.=")";
@@ -548,6 +552,7 @@
$sql_tables .= "marc_word as
m$nb_table,";
$sql_where1 .= "@$and_or[$i]
(m$nb_table.word like ".$dbh->quote("@$value[$i]");
if (@$tags[$i]) {
+ @$tags[$i] = $dbh->quote(@$tags[$i]) unless
@$tags[$i]=~ /^'/;
$sql_where1 .=" and
m$nb_table.tagsubfield in(@$tags[$i])";
}
$sql_where1.=")";
@@ -555,6 +560,7 @@
} else {
$sql_where1 .= "@$and_or[$i]
(m$nb_table.word like ".$dbh->quote("@$value[$i]");
if (@$tags[$i]) {
+ @$tags[$i] = $dbh->quote(@$tags[$i]) unless
@$tags[$i]=~ /^'/;
$sql_where1 .=" and
m$nb_table.tagsubfield in (@$tags[$i])";
}
$sql_where1.=")";
@@ -565,6 +571,7 @@
$sql_tables .= "marc_subfield_table as
m$nb_table,";
$sql_where1 .= "@$and_or[$i]
(m$nb_table.subfieldvalue @$operator[$i] ".$dbh->quote(@$value[$i]);
if (@$tags[$i]) {
+ @$tags[$i] = $dbh->quote(@$tags[$i]) unless
@$tags[$i]=~ /^'/;
$sql_where1 .=" and
concat(m$nb_table.tag,m$nb_table.subfieldcode) in (@$tags[$i])";
}
$sql_where2 .=
"m1.bibid=m$nb_table.bibid and ";