[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.29,1.30

Paul POULAIN tipaul at users.sourceforge.net
Wed Oct 27 10:11:47 CEST 2004


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15918/C4

Modified Files:
	SearchMarc.pm 
Log Message:
bugfix : using concat instead of + to merge field & subfield. Otherwise, when the subfield is a number, it's a numeric addition that is done !!!

Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** SearchMarc.pm	25 Oct 2004 09:38:00 -0000	1.29
--- SearchMarc.pm	27 Oct 2004 08:11:44 -0000	1.30
***************
*** 401,405 ****
  					$sql_where1 .= "(m1.subfieldvalue like ".$dbh->quote("@$value[$i]");
  					if (@$tags[$i]) {
! 						$sql_where1 .=" and m1.tag+m1.subfieldcode in (@$tags[$i])";
  					}
  					$sql_where1.=")";
--- 401,405 ----
  					$sql_where1 .= "(m1.subfieldvalue like ".$dbh->quote("@$value[$i]");
  					if (@$tags[$i]) {
! 						$sql_where1 .=" and concat(m1.tag,m1.subfieldcode) in (@$tags[$i])";
  					}
  					$sql_where1.=")";
***************
*** 415,419 ****
  					$sql_where1 .= "(m1.subfieldvalue @$operator[$i] ".$dbh->quote("@$value[$i]");
  					if (@$tags[$i]) {
! 						 $sql_where1 .=" and m1.tag+m1.subfieldcode in (@$tags[$i])";
  					}
  					$sql_where1.=")";
--- 415,419 ----
  					$sql_where1 .= "(m1.subfieldvalue @$operator[$i] ".$dbh->quote("@$value[$i]");
  					if (@$tags[$i]) {
! 						 $sql_where1 .=" and concat(m1.tag,m1.subfieldcode) in (@$tags[$i])";
  					}
  					$sql_where1.=")";
***************
*** 425,429 ****
  					$sql_where1 .= "@$and_or[$i] (m$nb_table.subfieldvalue like ".$dbh->quote("@$value[$i]");
  					if (@$tags[$i]) {
! 					 	$sql_where1 .=" and m$nb_table.tag+m$nb_table.subfieldcode in (@$tags[$i])";
  					}
  					$sql_where1.=")";
--- 425,429 ----
  					$sql_where1 .= "@$and_or[$i] (m$nb_table.subfieldvalue like ".$dbh->quote("@$value[$i]");
  					if (@$tags[$i]) {
! 					 	$sql_where1 .=" and concat(m$nb_table.tag,m$nb_table.subfieldcode) in (@$tags[$i])";
  					}
  					$sql_where1.=")";
***************
*** 452,456 ****
  					$sql_where1 .= "@$and_or[$i] (m$nb_table.subfieldvalue @$operator[$i] ".$dbh->quote(@$value[$i]);
  					if (@$tags[$i]) {
! 					 	$sql_where1 .="  and m$nb_table.tag+m$nb_table.subfieldcode in (@$tags[$i])";
  					}
  					$sql_where2 .= "m1.bibid=m$nb_table.bibid and ";
--- 452,456 ----
  					$sql_where1 .= "@$and_or[$i] (m$nb_table.subfieldvalue @$operator[$i] ".$dbh->quote(@$value[$i]);
  					if (@$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 ";





More information about the Koha-cvs mailing list