Bugzilla – Attachment 142848 Details for
Bug 31517
C4::Tags should use Koha::Tags objects instead of raw SQL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31517: Remove unused get_tag function
Bug-31517-Remove-unused-gettag-function.patch (text/plain), 2.10 KB, created by
David Nind
on 2022-11-01 01:02:38 UTC
(
hide
)
Description:
Bug 31517: Remove unused get_tag function
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-11-01 01:02:38 UTC
Size:
2.10 KB
patch
obsolete
>From f5c2bc8b02cdc71664bbd82ea9a181b3d25139b9 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@iki.fi> >Date: Fri, 2 Sep 2022 23:09:46 +0300 >Subject: [PATCH] Bug 31517: Remove unused get_tag function > >Signed-off-by: David Nind <david@davidnind.com> >--- > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31517
:
140187
|
140188
|
142847
|
142848
|
143046
|
143047
|
143048