Bugzilla – Attachment 168271 Details for
Bug 37057
OPACShowUnusedAuthorities displays unused authorities regardless
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37057: Restore filtering of unused authorities
Bug-37057-Restore-filtering-of-unused-authorities.patch (text/plain), 2.15 KB, created by
Martin Renvoize (ashimema)
on 2024-06-28 15:53:02 UTC
(
hide
)
Description:
Bug 37057: Restore filtering of unused authorities
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-06-28 15:53:02 UTC
Size:
2.15 KB
patch
obsolete
>From 0567a19282c672302ca02c8fa88d875ed673883d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 11 Jun 2024 12:29:13 +0000 >Subject: [PATCH] Bug 37057: Restore filtering of unused authorities > >Bug 12478 commented this code out, however, we do return the 'used' parameter in ES authority searches. While >we should implement the feature for both ES and Zebra as an index, we can restore this behaviour here. > >To test: >1 - Search authorities on OPAC with SearchEngine syspref set to both Elasticsearch and Zebra > I just searched for 'a' >2 - Confirm results with no usage are included >3 - Test with both values of OPACShowUnusedAuthorities >4 - Apply patch >5 - Repeat searches with both engines and syspref settings >6 - Confirm unused authorities not shown in either engine when syspref is "Don't show" >7 - Conifrm unused authorities shown in both engines when syspref is "Show" > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > opac/opac-authorities-home.pl | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl >index 9e617485d2f..bddcdc01150 100755 >--- a/opac/opac-authorities-home.pl >+++ b/opac/opac-authorities-home.pl >@@ -129,8 +129,6 @@ if ( $op eq "do_search" ) { > } > } > >- $template->param( result => $results ) if $results; >- > $template->param( > pagination_bar => pagination_bar( > $base_url, int( $total / $resultsperpage ) + 1, >@@ -142,11 +140,13 @@ if ( $op eq "do_search" ) { > ); > > unless (C4::Context->preference('OPACShowUnusedAuthorities')) { >-# TODO implement usage counts >-# my @usedauths = grep { $_->{used} > 0 } @$results; >-# $results = \@usedauths; >+# TODO implement usage counts in the indexes to filter during searching >+ my @usedauths = grep { $_->{used} > 0 } @$results; >+ $results = \@usedauths; > } > >+ $template->param( result => $results ) if $results; >+ > # Opac search history > if (C4::Context->preference('EnableOpacSearchHistory')) { > if ( $startfrom == 1) { >-- >2.45.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 37057
:
167629
|
167705
| 168271