Lines 62-72
sub shelfpage ($$$$$) {
Link Here
|
62 |
my $displaymode = ( $query->param('display') ? $query->param('display') : 'publicshelves' ); |
62 |
my $displaymode = ( $query->param('display') ? $query->param('display') : 'publicshelves' ); |
63 |
my ( $shelflimit, $shelfoffset, $shelveslimit, $shelvesoffset ); |
63 |
my ( $shelflimit, $shelfoffset, $shelveslimit, $shelvesoffset ); |
64 |
|
64 |
|
65 |
# FIXME: These limits should not be hardcoded... |
65 |
$shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') ); |
66 |
$shelflimit = 20; # Limits number of items returned for a given query |
66 |
$shelflimit = $shelflimit || 20; |
67 |
$shelfoffset = ( $itemoff - 1 ) * 20; # Sets the offset to begin retrieving items at |
67 |
$shelfoffset = ( $itemoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving items at |
68 |
$shelveslimit = 20; # Limits number of shelves returned for a given query (row_count) |
68 |
$shelveslimit = $shelflimit; # Limits number of shelves returned for a given query (row_count) |
69 |
$shelvesoffset = ( $shelfoff - 1 ) * 20; # Sets the offset to begin retrieving shelves at (offset) |
69 |
$shelvesoffset = ( $shelfoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving shelves at (offset) |
70 |
# getting the Shelves list |
70 |
# getting the Shelves list |
71 |
my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 ); |
71 |
my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 ); |
72 |
my ( $shelflist, $totshelves ) = GetShelves( $category, $shelveslimit, $shelvesoffset, $loggedinuser ); |
72 |
my ( $shelflist, $totshelves ) = GetShelves( $category, $shelveslimit, $shelvesoffset, $loggedinuser ); |
73 |
- |
|
|