Bugzilla – Attachment 85748 Details for
Bug 22420
Tag cloud feature broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22420: Remove duplicated tags
Bug-22420-Remove-duplicated-tags.patch (text/plain), 1.61 KB, created by
Jonathan Druart
on 2019-02-26 20:12:17 UTC
(
hide
)
Description:
Bug 22420: Remove duplicated tags
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-02-26 20:12:17 UTC
Size:
1.61 KB
patch
obsolete
>From 3df60ebfb1cb27f76f1e60d6b025961aa370cbb3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 26 Feb 2019 17:08:40 -0300 >Subject: [PATCH] Bug 22420: Remove duplicated tags > >Caused by > commit e1b5fa657de843a177fb4bf57947a1376152d021 > Bug 14385: Squash of a lot of patches rebased > >Test plan: >- Have the OPAC tags feature enabled >- Add a couple tags to different records, make sure some of them are >used more than once >- Go to 'Tag cloud' in the OPAC >=> the repeated tags must not be repeated many times. >--- > opac/opac-tags.pl | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > >diff --git a/opac/opac-tags.pl b/opac/opac-tags.pl >index 272d896f23..bf50eb4aa5 100755 >--- a/opac/opac-tags.pl >+++ b/opac/opac-tags.pl >@@ -307,6 +307,7 @@ if ($add_op) { > $results = get_approval_rows($arghash); > my @filtered_results; > foreach my $my_tag (@$my_tags) { >+ next if grep {/^$my_tag$/} @filtered_results; > if (grep { $_->{term} eq $my_tag->{term} } @$results) { > if (! $my_tag->{visible} ) { > my $check_biblio = GetMarcBiblio({ >@@ -314,12 +315,9 @@ if ($add_op) { > embed_items => 1, > opac => 1, > borcat => $borcat }); >- if ($check_biblio) { >- push @filtered_results, $my_tag; >- } >- } else { >- push @filtered_results, $my_tag; >+ next unless $check_biblio; > } >+ push @filtered_results, $my_tag; > } > } > $results = \@filtered_results; >-- >2.11.0
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 22420
:
85748
|
85755
|
89163