Bugzilla – Attachment 2930 Details for
Bug 5560
pagination option for lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed change
0001-Fix-for-Bug-5560-pagination-option-for-lists.patch (text/plain), 2.08 KB, created by
Owen Leonard
on 2010-12-30 18:26:07 UTC
(
hide
)
Description:
Proposed change
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-12-30 18:26:07 UTC
Size:
2.08 KB
patch
obsolete
>From 0b83fb4339dad9962c59867cb7a5dc38abf95794 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 30 Dec 2010 12:49:13 -0500 >Subject: [PATCH] Fix for Bug 5560 - pagination option for lists > >This patch doesn't enable per-list pagination options, >but makes OPAC and staff client list display obey >the OPACnumSearchResults and numSearchResults system >preferences instead >--- > C4/VirtualShelves/Page.pm | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm >index 80d8f3c..1ce360e 100644 >--- a/C4/VirtualShelves/Page.pm >+++ b/C4/VirtualShelves/Page.pm >@@ -62,11 +62,11 @@ sub shelfpage ($$$$$) { > my $displaymode = ( $query->param('display') ? $query->param('display') : 'publicshelves' ); > my ( $shelflimit, $shelfoffset, $shelveslimit, $shelvesoffset ); > >- # FIXME: These limits should not be hardcoded... >- $shelflimit = 20; # Limits number of items returned for a given query >- $shelfoffset = ( $itemoff - 1 ) * 20; # Sets the offset to begin retrieving items at >- $shelveslimit = 20; # Limits number of shelves returned for a given query (row_count) >- $shelvesoffset = ( $shelfoff - 1 ) * 20; # Sets the offset to begin retrieving shelves at (offset) >+ $shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') ); >+ $shelflimit = $shelflimit || 20; >+ $shelfoffset = ( $itemoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving items at >+ $shelveslimit = $shelflimit; # Limits number of shelves returned for a given query (row_count) >+ $shelvesoffset = ( $shelfoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving shelves at (offset) > # getting the Shelves list > my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 ); > my ( $shelflist, $totshelves ) = GetShelves( $category, $shelveslimit, $shelvesoffset, $loggedinuser ); >-- >1.7.3 >
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 5560
:
2930