Bugzilla – Attachment 85755 Details for
Bug 22420
Tag cloud feature broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[ALTERNATIVE] Bug 22420: Remove wrong calaculation on approved tags
ALTERNATIVE-Bug-22420-Remove-wrong-calaculation-on.patch (text/plain), 2.63 KB, created by
Tomás Cohen Arazi
on 2019-02-27 10:23:55 UTC
(
hide
)
Description:
[ALTERNATIVE] Bug 22420: Remove wrong calaculation on approved tags
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2019-02-27 10:23:55 UTC
Size:
2.63 KB
patch
obsolete
>From 410798a0fe996347987cbb99c1ab286713d7aff4 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 27 Feb 2019 07:09:12 -0300 >Subject: [PATCH] [ALTERNATIVE] Bug 22420: Remove wrong calaculation on > approved tags > >Before the patch from bug 14385, the passed structure (that is returned >by get_approval_rows() looks like: > >\ [ > [0] { > approved 1, > approved_by 51, > approved_by_name undef, > date_approved "2019-02-26 15:36:42", > term "another", > weight_total 3 > }, > [1] { > ... > >After the introduced 'filtering', we loose the information about the >term weight!: > >\ [ > [0] { > approved 1, > author "Heylin, Clinton.", > biblionumber 1, > borrowernumber 51, > date_created "2019-02-26 15:36:37", > language undef, > subtitle [], > tag_id 1, > term "word", > time_created_display "15:36:37", > title "E Street shuffle :", > visible 1, > XSLTBloc " > <<<BUNCH OF GENERATED HTML HERE>>> > ... > >The code even calls GetMarcBiblio. This needs to be reverted as it is >plain wrong. If it was worth removing *some* biblios from the >weight_total value, then this calculation should be done somewhere else, >without fetching the MARC data again. >--- > opac/opac-tags.pl | 18 ------------------ > 1 file changed, 18 deletions(-) > >diff --git a/opac/opac-tags.pl b/opac/opac-tags.pl >index 272d896f23..d9c5add813 100755 >--- a/opac/opac-tags.pl >+++ b/opac/opac-tags.pl >@@ -305,24 +305,6 @@ if ($add_op) { > $arghash->{biblionumber} = $arg; > } > $results = get_approval_rows($arghash); >- my @filtered_results; >- foreach my $my_tag (@$my_tags) { >- if (grep { $_->{term} eq $my_tag->{term} } @$results) { >- if (! $my_tag->{visible} ) { >- my $check_biblio = GetMarcBiblio({ >- biblionumber => $my_tag->{biblionumber}, >- embed_items => 1, >- opac => 1, >- borcat => $borcat }); >- if ($check_biblio) { >- push @filtered_results, $my_tag; >- } >- } else { >- push @filtered_results, $my_tag; >- } >- } >- } >- $results = \@filtered_results; > stratify_tags(10, $results); # work out the differents sizes for things > my $count = scalar @$results; > $template->param(TAGLOOP_COUNT => $count, mine => $mine); >-- >2.21.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