From a8fdb3cfc470e0f5a81bcc279e2faf2e3c0a58cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Fri, 2 Sep 2022 23:09:46 +0300 Subject: [PATCH] Bug 31517: Remove unused get_tag function Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- C4/Tags.pm | 9 +-------- opac/opac-search.pl | 2 +- t/db_dependent/Tags.t | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/C4/Tags.pm b/C4/Tags.pm index 1df1a5524e..348f33536e 100644 --- a/C4/Tags.pm +++ b/C4/Tags.pm @@ -36,7 +36,7 @@ our (@ISA, @EXPORT_OK); BEGIN { @ISA = qw(Exporter); @EXPORT_OK = qw( - get_tag get_tags get_tag_rows + get_tags get_tag_rows add_tags add_tag add_tag_approval @@ -438,13 +438,6 @@ sub add_tag_index { return $sth->rows; } -sub get_tag { # by tag_id - (@_) or return; - my $sth = C4::Context->dbh->prepare(TAG_SELECT . "WHERE tag_id = ?"); - $sth->execute(shift); - return $sth->fetchrow_hashref; -} - sub increment_weights { increment_weight(@_); increment_weight_total(shift); diff --git a/opac/opac-search.pl b/opac/opac-search.pl index fe1297b3f2..10dc707a3e 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -50,7 +50,7 @@ use C4::Search qw( searchResults ); use C4::Search::History; use C4::Biblio qw( GetXmlBiblio CountItemsIssued ); use C4::Koha qw( GetItemTypesCategorized getitemtypeimagelocation GetAuthorisedValues ); -use C4::Tags qw( get_tags get_tag ); +use C4::Tags qw( get_tags ); use C4::SocialData; use C4::External::OverDrive; use C4::External::BakerTaylor qw( image_url link_url ); diff --git a/t/db_dependent/Tags.t b/t/db_dependent/Tags.t index 30cbc12b48..b72ebd7b41 100755 --- a/t/db_dependent/Tags.t +++ b/t/db_dependent/Tags.t @@ -30,7 +30,7 @@ use Koha::Tags; use Koha::Tags::Approvals; use Koha::Tags::Indexes; -use C4::Tags qw( add_tag_approval add_tag add_tag_index get_tag_rows get_tag stratify_tags ); +use C4::Tags qw( add_tag_approval add_tag add_tag_index get_tag_rows stratify_tags ); # So any output is readable :-D binmode STDOUT, ':encoding(utf8)'; -- 2.39.5