Browse Source

Bug 26133: Remove GetMarc* calls in detail.pl

There are several calls in catalogue/detail.pl that can be removed:
GetMarcISBN, GetMarcAuthors, GetMarcSubjects, GetMarcSeries, GetMarcUrls and GetMarcHosts
They pass a variable to the template that is never used.

Test plan:
Confirm that this TT variable is never used.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Jonathan Druart 1 year ago
parent
commit
5c190388ae
  1. 12
      catalogue/detail.pl
  2. 2
      opac/opac-detail.pl

12
catalogue/detail.pl

@ -176,12 +176,6 @@ $template->param(
);
my $marcnotesarray = GetMarcNotes( $record, $marcflavour );
my $marcisbnsarray = GetMarcISBN( $record, $marcflavour );
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my $marcseriesarray = GetMarcSeries($record,$marcflavour);
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
my $marchostsarray = GetMarcHosts($record,$marcflavour);
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } };
@ -418,12 +412,6 @@ if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) {
$template->param( norequests => $norequests );
$template->param(
MARCNOTES => $marcnotesarray,
MARCSUBJCTS => $marcsubjctsarray,
MARCAUTHORS => $marcauthorsarray,
MARCSERIES => $marcseriesarray,
MARCURLS => $marcurlsarray,
MARCISBNS => $marcisbnsarray,
MARCHOSTS => $marchostsarray,
itemdata_ccode => $itemfields{ccode},
itemdata_enumchron => $itemfields{enumchron},
itemdata_uri => $itemfields{uri},

2
opac/opac-detail.pl

@ -778,7 +778,6 @@ if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) {
my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour);
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
my $marchostsarray = GetMarcHosts($record,$marcflavour);
$template->param(
MARCSUBJCTS => $marcsubjctsarray,
@ -786,7 +785,6 @@ if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) {
MARCSERIES => $marcseriesarray,
MARCURLS => $marcurlsarray,
MARCISBNS => $marcisbnsarray,
MARCHOSTS => $marchostsarray,
);
}

Loading…
Cancel
Save