From 4171bec33b9f1aeda9709ac4898ab637d8f3e2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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 --- 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.30.2