[Koha-cvs] CVS: koha/search.marc search.pl,1.3,1.4

Ambrose Li acli at users.sourceforge.net
Mon Feb 3 19:46:06 CET 2003


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

Modified Files:
	search.pl 
Log Message:
Minor factoring in C4/Biblio.pm, plus change to export the per-tag
'mandatory' property to a per-subfield 'tag_mandatory' template parameter,
so that addbiblio.tmpl can distinguish between mandatory subfields in a
mandatory tag and mandatory subfields in an optional tag

Not-minor factoring in acqui.simple/addbiblio.pl to make the if-else blocks
smaller, and to add some POD; need further testing for this

Added function to check if a MARC subfield name is "koha-internal" (instead
of checking it for 'lib' and 'tag' everywhere); temporarily added to Koha.pm

Use above function in acqui.simple/additem.pl and search.marc/search.pl


Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/search.marc/search.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** search.pl	2 Feb 2003 07:18:38 -0000	1.3
--- search.pl	3 Feb 2003 18:46:04 -0000	1.4
***************
*** 30,33 ****
--- 30,34 ----
  use C4::Biblio;
  use C4::SearchMarc;
+ use C4::Koha; # XXX subfield_is_koha_internal_p
  
  my $query=new CGI;
***************
*** 93,98 ****
  		foreach my $tag (sort(keys (%{$tagslib}))) {
  			foreach my $subfield (sort(keys %{$tagslib->{$tag}})) {
! 				next if ($subfield eq 'lib'); # skip lib and tabs, which are koha internal
! 				next if ($subfield eq 'tab');
  				next unless ($tagslib->{$tag}->{$subfield}->{tab} eq $tabloop);
  				push @marcarray, "$tag$subfield - $tagslib->{$tag}->{$subfield}->{lib}";
--- 94,98 ----
  		foreach my $tag (sort(keys (%{$tagslib}))) {
  			foreach my $subfield (sort(keys %{$tagslib->{$tag}})) {
! 				next if subfield_is_koha_internal_p($subfield);
  				next unless ($tagslib->{$tag}->{$subfield}->{tab} eq $tabloop);
  				push @marcarray, "$tag$subfield - $tagslib->{$tag}->{$subfield}->{lib}";





More information about the Koha-cvs mailing list