[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.46,1.47

Waylon Robertson genjimoto at users.sourceforge.net
Sat Jun 25 07:35:31 CEST 2005


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

Modified Files:
	SearchMarc.pm 
Log Message:
New code making a search not needing to use tables not already used in searching.. doesn't take longer than normal. Achieved via new parameter in Catalogsearch called $extratables.

Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** SearchMarc.pm	20 Jun 2005 14:10:01 -0000	1.46
--- SearchMarc.pm	25 Jun 2005 05:35:29 -0000	1.47
***************
*** 151,154 ****
--- 151,159 ----
  optional argument containing an sql string to be used in the 'where' statement. see usage in opac-search.pl.
  
+ =head2 $extratables
+ 
+ optional argument containing extra tables to search. Used in conjunction with $sqlstring. See usage in opac-search.pl.
+ String... so ',items,issues,reserves' allows the items, issues and reserves tables to be used.in a where.
+ 
  =head2 RETURNS
  
***************
*** 170,174 ****
  
  sub catalogsearch {
! 	my ($dbh, $tags, $and_or, $excluding, $operator, $value, $offset,$length,$orderby,$desc_or_asc,$sqlstring) = @_;
  	# build the sql request. She will look like :
  	# select m1.bibid
--- 175,179 ----
  
  sub catalogsearch {
! 	my ($dbh, $tags, $and_or, $excluding, $operator, $value, $offset,$length,$orderby,$desc_or_asc,$sqlstring, $extratables) = @_;
  	# build the sql request. She will look like :
  	# select m1.bibid
***************
*** 278,281 ****
--- 283,287 ----
  	my ($sql_tables, $sql_where1, $sql_where2) = create_request($dbh,\@normal_tags, \@normal_and_or, \@normal_operator, \@normal_value);
    $sql_where1 .= $sqlstring;
+   $sql_tables .= $extratables;
  	$sql_where1 .= "and TO_DAYS( NOW( ) ) - TO_DAYS( biblio.timestamp ) <30" if $orderby =~ "biblio.timestamp";
  	my $sth;





More information about the Koha-cvs mailing list