koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Ambrose Li
Subject: [Koha-cvs] CVS: koha/search.marc search.pl,1.3,1.4
Date: Mon, 03 Feb 2003 10:46:06 -0800

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}";




reply via email to

[Prev in Thread] Current Thread [Next in Thread]