Bugzilla – Attachment 54955 Details for
Bug 17048
Authority search result list page scrolling not working properly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 17048: Fix pagination offset for authority searches
PASSED-QA-Bug-17048-Fix-pagination-offset-for-auth.patch (text/plain), 2.50 KB, created by
Katrin Fischer
on 2016-08-28 19:13:53 UTC
(
hide
)
Description:
[PASSED QA] Bug 17048: Fix pagination offset for authority searches
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-08-28 19:13:53 UTC
Size:
2.50 KB
patch
obsolete
>From a5d553a05848c3311c122235b456c272fa2edf5a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 19 Aug 2016 14:36:23 +0100 >Subject: [PATCH] [PASSED QA] Bug 17048: Fix pagination offset for authority > searches > >At the intranet, the pagination has been broken by bug 12478 (Elastic >Search). There was a confusion between the offset and the page number. > >At the OPAC, it is broken since bug 2735 which has mimicked the intranet >script. > >Test plan: >Search for a term which will return more than 1 page of results. >Click on the second page >=> Without this patch, the first result of the second page is the second >result of the first page >=> With this patch applied, the offset will be corrected > >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > authorities/authorities-home.pl | 4 ++-- > opac/opac-authorities-home.pl | 3 ++- > 2 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl >index 426b1ba..6e0a8fe 100755 >--- a/authorities/authorities-home.pl >+++ b/authorities/authorities-home.pl >@@ -87,9 +87,9 @@ if ( $op eq "do_search" ) { > [$marclist], [$and_or], [$excluding], [$operator], > [$value], $authtypecode, $orderby > ); >- $startfrom = $startfrom // 0; >+ my $offset = ( $startfrom - 1 ) * $resultsperpage + 1; > my ( $results, $total ) = >- $searcher->search_auth_compat( $search_query, $startfrom, >+ $searcher->search_auth_compat( $search_query, $offset, > $resultsperpage ); > #my ( $results, $total ) = SearchAuthorities( > # [$marclist], [$and_or], >diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl >index 5b1a42b..d92166b 100755 >--- a/opac/opac-authorities-home.pl >+++ b/opac/opac-authorities-home.pl >@@ -64,8 +64,9 @@ if ( $op eq "do_search" ) { > { index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); > my $search_query = $builder->build_authorities_query_compat( \@marclist, \@and_or, > \@excluding, \@operator, \@value, $authtypecode, $orderby ); >+ my $offset = ( $startfrom - 1 ) * $resultsperpage + 1; > my ( $results, $total ) = >- $searcher->search_auth_compat( $search_query, $startfrom, $resultsperpage ); >+ $searcher->search_auth_compat( $search_query, $offset, $resultsperpage ); > ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { > template_name => "opac-authoritiessearchresultlist.tt", >-- >2.1.4
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 17048
:
53988
|
53989
|
53990
|
54639
|
54788
| 54955