From f936b3ccbac9906541474cedea373be5ad6b3fe3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 4 Jan 2017 11:53:33 +0100 Subject: [PATCH] Bug 17844: Remove C4::Koha::get_notforloan_label_of Signed-off-by: Josef Moravec --- C4/Koha.pm | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index b6e494a..587c6c9 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -47,7 +47,6 @@ BEGIN { &getFacets &getnbpages &get_infos_of - &get_notforloan_label_of &getitemtypeimagedir &getitemtypeimagesrc &getitemtypeimagelocation @@ -704,58 +703,6 @@ sub get_infos_of { return \%infos_of; } -=head2 get_notforloan_label_of - - my $notforloan_label_of = get_notforloan_label_of(); - -Each authorised value of notforloan (information available in items and -itemtypes) is link to a single label. - -Returns a href where keys are authorised values and values are corresponding -labels. - - foreach my $authorised_value (keys %{$notforloan_label_of}) { - printf( - "authorised_value: %s => %s\n", - $authorised_value, - $notforloan_label_of->{$authorised_value} - ); - } - -=cut - -# FIXME - why not use GetAuthorisedValues ?? -# -sub get_notforloan_label_of { - my $dbh = C4::Context->dbh; - - my $query = ' -SELECT authorised_value - FROM marc_subfield_structure - WHERE kohafield = \'items.notforloan\' - LIMIT 0, 1 -'; - my $sth = $dbh->prepare($query); - $sth->execute(); - my ($statuscode) = $sth->fetchrow_array(); - - $query = ' -SELECT lib, - authorised_value - FROM authorised_values - WHERE category = ? -'; - $sth = $dbh->prepare($query); - $sth->execute($statuscode); - my %notforloan_label_of; - while ( my $row = $sth->fetchrow_hashref ) { - $notforloan_label_of{ $row->{authorised_value} } = $row->{lib}; - } - $sth->finish; - - return \%notforloan_label_of; -} - =head2 GetAuthorisedValues $authvalues = GetAuthorisedValues([$category]); -- 2.1.4