Bug 28784: Remove code related to num_paragraph cookie
[koha-ffzg.git] / opac / opac-ISBDdetail.pl
index 6278177..567caf4 100755 (executable)
@@ -40,19 +40,26 @@ the items attached to the biblio
 =cut
 
 use Modern::Perl;
-use YAML::XS;
-use Encode;
 
-use C4::Auth;
+use C4::Auth qw( get_template_and_user );
 use C4::Context;
-use C4::Output;
+use C4::Output qw( parametrized_url output_html_with_http_headers );
 use CGI qw ( -utf8 );
-use C4::Biblio;
-use C4::Items;
+use C4::Biblio qw(
+    CountItemsIssued
+    GetISBDView
+    GetMarcControlnumber
+    GetMarcISSN
+    TransformMarcToKoha
+);
 use C4::Reserves;
-use C4::Acquisition;
-use C4::Serials;    # uses getsubscriptionfrom biblionumber
-use C4::Koha;
+use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
+use C4::Koha qw(
+    GetNormalizedEAN
+    GetNormalizedISBN
+    GetNormalizedOCLCNumber
+    GetNormalizedUPC
+);
 use Koha::CirculationRules;
 use Koha::ItemTypes;
 use Koha::Patrons;
@@ -75,17 +82,12 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $query,
         type            => "opac",
         authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
-        debug           => 1,
     }
 );
 
 my $patron = Koha::Patrons->find($loggedinuser);
 
-my $opachiddenitems_rules;
-eval {
-    my $yaml = C4::Context->preference('OpacHiddenItems') . "\n\n";
-    $opachiddenitems_rules = YAML::XS::Load(Encode::encode_utf8($yaml));
-};
+my $opachiddenitems_rules = C4::Context->yaml_preference('OpacHiddenItems');
 
 unless ( $patron and $patron->category->override_hidden_items ) {
     # only skip this check if there's a logged in user