[Koha-cvs] CVS: koha/C4 AuthoritiesMarc.pm,1.4,1.5

doXulting doxulting at users.sourceforge.net
Mon Jul 5 15:37:25 CEST 2004


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

Modified Files:
	AuthoritiesMarc.pm 
Log Message:
First step for working authorities

Index: AuthoritiesMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/AuthoritiesMarc.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** AuthoritiesMarc.pm	22 Jun 2004 11:35:37 -0000	1.4
--- AuthoritiesMarc.pm	5 Jul 2004 13:37:22 -0000	1.5
***************
*** 94,97 ****
--- 94,98 ----
  
  	my $sth;
+ 
  	if ($sql_where2) {
  		$sth = $dbh->prepare("select distinct m1.authid from auth_header,$sql_tables where  m1.authid=auth_header.authid and auth_header.authtypecode=? and $sql_where2 and ($sql_where1)");
***************
*** 103,107 ****
  	$sth->execute($authtypecode);
  	my @result = ();
- 
  	while (my ($authid) = $sth->fetchrow) {
  			warn "AUTH: $authid";
--- 104,107 ----
***************
*** 173,176 ****
--- 173,177 ----
  	my $nb_table=1; # will contain the number of table. ++ on each entry EXCEPT when an OR  is provided.
  
+ 
  	for(my $i=0; $i<=@$value;$i++) {
  		if (@$value[$i]) {
***************
*** 184,189 ****
  					}
  					$sql_where1.=")";
! 				} elsif (@$operator[$i] eq "contains") {
! 					$sql_tables .= "auth_word as m$nb_table,";
  					$sql_where1 .= "(m1.word  like ".$dbh->quote("@$value[$i]%");
  					if (@$tags[$i]) {
--- 185,190 ----
  					}
  					$sql_where1.=")";
! 				} elsif (@$operator[$i] eq "contains") {	
! 				$sql_tables .= "auth_word as m$nb_table,";
  					$sql_where1 .= "(m1.word  like ".$dbh->quote("@$value[$i]%");
  					if (@$tags[$i]) {
***************
*** 192,195 ****
--- 193,197 ----
  					$sql_where1.=")";
  				} else {
+ 
  					$sql_tables .= "auth_subfield_table as m$nb_table,";
  					$sql_where1 .= "(m1.subfieldvalue @$operator[$i] ".$dbh->quote("@$value[$i]");
***************
*** 251,254 ****
--- 253,257 ----
  	}
  	chop $sql_tables;	# deletes the trailing ','
+ 	
  	return ($sql_tables, $sql_where1, $sql_where2);
  }
***************
*** 825,828 ****
--- 828,834 ----
  # $Id$
  # $Log$
+ # Revision 1.5  2004/07/05 13:37:22  doxulting
+ # First step for working authorities
+ #
  # Revision 1.4  2004/06/22 11:35:37  tipaul
  # removing % at the beginning of a string to avoid loooonnnngggg searchs





More information about the Koha-cvs mailing list