Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

PT13633157: OPAC not obeying 942$n bib suppression setting (SC #14321)

If the framework allows the biblionumber (999$c) field to be displayed and
edited within the MARC editor, then this results in an additional 999$c value
being added to the MARC record.  This is because the code already pulled the
biblionumber from the biblio table.  This patch removes the addition of the
extra 999$c field, although this field shouldn't really be editable in the
first place.
  • Loading branch information...
commit 15d9d64084165e159ebdf462a3f273939601c8f4 1 parent 907190e
dlbptfs dlbptfs authored ctfliblime committed

Showing 1 changed file with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. +8 2 C4/Biblio.pm
10 C4/Biblio.pm
@@ -1858,13 +1858,13 @@ sub TransformHtmlToMarc {
1858 1858 my $record = MARC::Record->new();
1859 1859 my $i=0;
1860 1860 my @fields;
  1861 + my ( $biblionumbertagfield, $biblionumbertagsubfield ) =
  1862 + &GetMarcFromKohaField( "biblio.biblionumber", '' );
1861 1863 while ($params->[$i]){ # browse all CGI params
1862 1864 my $param = $params->[$i];
1863 1865 my $newfield=0;
1864 1866 # if we are on biblionumber, store it in the MARC::Record (it may not be in the edited fields)
1865 1867 if ($param eq 'biblionumber') {
1866   - my ( $biblionumbertagfield, $biblionumbertagsubfield ) =
1867   - &GetMarcFromKohaField( "biblio.biblionumber", '' );
1868 1868 if ($biblionumbertagfield < 10) {
1869 1869 $newfield = MARC::Field->new(
1870 1870 $biblionumbertagfield,
@@ -1903,6 +1903,12 @@ sub TransformHtmlToMarc {
1903 1903 } else {
1904 1904 while(defined $params->[$j] && $params->[$j] =~ /_code_/){ # browse all it's subfield
1905 1905 my $inner_param = $params->[$j];
  1906 + my $biblionumbertagsubfield_string = "_code_" . $biblionumbertagsubfield . "_";
  1907 + if (($tag eq $biblionumbertagfield) &&
  1908 + ($inner_param =~ /$biblionumbertagsubfield_string/)) {
  1909 + $j += 2;
  1910 + next;
  1911 + }
1906 1912 if ($newfield){
1907 1913 if($cgi->param($params->[$j+1]) ne ''){ # only if there is a value (code => value)
1908 1914 $newfield->add_subfields(

0 comments on commit 15d9d64

Please sign in to comment.
Something went wrong with that request. Please try again.