[Koha-cvs] CVS: koha/search.marc dictionary.pl,1.1,1.2

Henri-Damien LAURENT hdl at users.sourceforge.net
Mon May 2 17:40:06 CEST 2005


Update of /cvsroot/koha/koha/search.marc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25849/search.marc

Modified Files:
	dictionary.pl 
Log Message:
Improving output:
Should be a good start point for choosing what to display.

Index: dictionary.pl
===================================================================
RCS file: /cvsroot/koha/koha/search.marc/dictionary.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** dictionary.pl	2 May 2005 09:25:13 -0000	1.1
--- dictionary.pl	2 May 2005 15:39:24 -0000	1.2
***************
*** 93,97 ****
  										\@excluding, \@operator,  \@value,
  										$startfrom*$resultsperpage, $resultsperpage,$orderby);
! 	
  	my $strsth="Select distinct authtypecode from marc_subfield_structure where ";
  	my $strtagfields="tagfield in (";
--- 93,111 ----
  										\@excluding, \@operator,  \@value,
  										$startfrom*$resultsperpage, $resultsperpage,$orderby);
! 	my %seen = ();
! 
! 	foreach my $item (@$results) {
! 		my $display;
! 		$display="author" if ($field=~/author/);
! 		$display="title" if ($field=~/title/);
! 		$display="subject" if ($field=~/subject/);
! 		$display="publishercode" if ($field=~/publisher/);
! 	    $seen{$item->{$display}}++;
! 	}
! 	my @catresults;
! 	foreach my $name (keys %seen){
! 		push @catresults, { value => $name , count => $seen{$name}}
! 	}
! 
  	my $strsth="Select distinct authtypecode from marc_subfield_structure where ";
  	my $strtagfields="tagfield in (";
***************
*** 173,176 ****
--- 187,191 ----
  	}
  	$template->param(result => $results,
+ 					 catresult=> \@catresults,
  						search => $search[0],
  						marclist =>$field,





More information about the Koha-cvs mailing list