Bug 2505 - Add commented use warnings where missing in the catalogue/ directory
[koha.git] / catalogue / ISBDdetail.pl
blob40a434d37c6d9cb942939e7130b7ef3684a99ed0
1 #!/usr/bin/perl
3 # Copyright 2000-2002 Katipo Communications
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
10 # version.
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 =head1 NAME
22 ISBDdetail.pl : script to show a biblio in ISBD format
24 =head1 SYNOPSIS
27 =head1 DESCRIPTION
29 This script needs a biblionumber as parameter
31 =head1 FUNCTIONS
33 =over 2
35 =cut
37 use strict;
38 #use warnings; FIXME - Bug 2505
40 use C4::Auth;
41 use C4::Context;
42 use C4::Output;
43 use CGI;
44 use C4::Koha;
45 use C4::Biblio;
46 use C4::Items;
47 use C4::Branch; # GetBranchDetail
48 use C4::Serials; # CountSubscriptionFromBiblionumber
49 use C4::Search; # enabled_staff_search_views
51 #---- Internal function
54 my $query = new CGI;
55 my $dbh = C4::Context->dbh;
57 my $biblionumber = $query->param('biblionumber');
59 # open template
60 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
62 template_name => "catalogue/ISBDdetail.tmpl",
63 query => $query,
64 type => "intranet",
65 authnotrequired => 0,
66 flagsrequired => { catalogue => 1 },
70 # my @blocs = split /\@/,$ISBD;
71 # my @fields = $record->fields();
72 my $res = GetISBDView($biblionumber, "intranet");
74 # count of item linked with biblio
75 my $itemcount = GetItemsCount($biblionumber);
76 $template->param( count => $itemcount);
77 my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
79 if ($subscriptionsnumber) {
80 my $subscriptions = GetSubscriptionsFromBiblionumber($biblionumber);
81 my $subscriptiontitle = $subscriptions->[0]{'bibliotitle'};
82 $template->param(
83 subscriptionsnumber => $subscriptionsnumber,
84 subscriptiontitle => $subscriptiontitle,
88 $template->param (
89 ISBD => $res,
90 biblionumber => $biblionumber,
91 isbdview => 1,
92 z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
93 C4::Search::enabled_staff_search_views,
96 output_html_with_http_headers $query, $cookie, $template->output;