Bug 26133: Remove GetMarc* calls in detail.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 4 Aug 2020 11:54:28 +0000 (13:54 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 5 Aug 2020 15:36:28 +0000 (17:36 +0200)
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>

catalogue/detail.pl
opac/opac-detail.pl

index d01de15..4a2aa3a 100755 (executable)
@@ -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},
index 94a935f..f4bdf3d 100755 (executable)
@@ -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,
     );
 }