Bugzilla – Attachment 3507 Details for
Bug 5994
Private lists are limited to only 10
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-5994-MT2968-private-lists-display-is-no-longer-s.patch (text/plain), 4.43 KB, created by
Chris Cormack
on 2011-03-29 20:55:45 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-03-29 20:55:45 UTC
Size:
4.43 KB
patch
obsolete
>From 09ab7b225f97540eb981165540535def54e43d6c Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Wed, 17 Feb 2010 09:42:49 +0100 >Subject: [PATCH] Bug 5994 : MT2968: private lists display is no longer shortened to 10 lists > >--- > C4/Auth.pm | 2 +- > C4/VirtualShelves.pm | 8 +++++--- > catalogue/search.pl | 2 +- > opac/opac-addbybiblionumber.pl | 2 +- > virtualshelves/addbybiblionumber.pl | 2 +- > 5 files changed, 9 insertions(+), 7 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 5f28d5c..b7192d0 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -837,7 +837,7 @@ sub checkauth { > # and the number of lists to be displayed of each type in the 'Lists' button drop down > my $row_count = 10; # FIXME:This probably should be a syspref > my ($total, $totshelves, $barshelves, $pubshelves); >- ($barshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(1, $row_count, $borrowernumber); >+ ($barshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(1, undef, $borrowernumber); > $total->{'bartotal'} = $totshelves; > ($pubshelves, $totshelves) = C4::VirtualShelves::GetRecentShelves(2, $row_count, undef); > $total->{'pubtotal'} = $totshelves; >diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm >index 77ae394..5c9218a 100644 >--- a/C4/VirtualShelves.pm >+++ b/C4/VirtualShelves.pm >@@ -201,11 +201,13 @@ sub GetRecentShelves ($$$) { > my ($mincategory, $row_count, $owner) = @_; > my (@shelflist); > my $total = _shelf_count($owner, $mincategory); >- my @params = ($owner, $mincategory, 0, $row_count); #FIXME: offset is hardcoded here, but could be passed in for enhancements >+ my @params = ($owner, $mincategory); >+ push @params, $row_count if (defined $row_count); > shift @params if (not defined $owner); > my $query = "SELECT * FROM virtualshelves"; > $query .= ((defined $owner) ? " WHERE owner = ? AND category = ?" : " WHERE category >= ? "); >- $query .= " ORDER BY lastmodified DESC LIMIT ?, ?"; >+ $query .= " ORDER BY lastmodified DESC"; >+ $query .= " LIMIT ?" if (defined $row_count); > my $sth = $dbh->prepare($query); > $sth->execute(@params); > @shelflist = $sth->fetchall_arrayref({}); >@@ -534,7 +536,7 @@ sub RefreshShelvesSummary ($$$) { > my $session = C4::Auth::get_session($sessionID); > my ($total, $totshelves, $barshelves, $pubshelves); > >- ($barshelves, $totshelves) = GetRecentShelves(1, $row_count, $loggedinuser); >+ ($barshelves, $totshelves) = GetRecentShelves(1, undef, $loggedinuser); > $total->{'bartotal'} = $totshelves; > ($pubshelves, $totshelves) = GetRecentShelves(2, $row_count, undef); > $total->{'pubtotal'} = $totshelves; >diff --git a/catalogue/search.pl b/catalogue/search.pl >index b22837a..9ca01ef 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -672,7 +672,7 @@ if ($query_desc || $limit_desc) { > > my $row_count = 10; # FIXME:This probably should be a syspref > my ($pubshelves, $total) = GetRecentShelves(2, $row_count, undef); >-my ($barshelves, $total) = GetRecentShelves(1, $row_count, $borrowernumber); >+my ($barshelves, $total) = GetRecentShelves(1, undef, $borrowernumber); > > my @pubshelves = @{$pubshelves}; > my @barshelves = @{$barshelves}; >diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl >index b1bf224..78c0e2a 100755 >--- a/opac/opac-addbybiblionumber.pl >+++ b/opac/opac-addbybiblionumber.pl >@@ -102,7 +102,7 @@ else { > my %shelvesloop; > #grab each type of shelf, open (type 3) should not be limited by user. > foreach my $shelftype (1,2,3) { >- my ($shelflist) = GetRecentShelves($shelftype, $limit, $shelftype == 3 ? undef : $loggedinuser); >+ my ($shelflist) = GetRecentShelves($shelftype, $shelftype == 1 ? undef : $limit, $shelftype == 3 ? undef : $loggedinuser); > for my $shelf (@{ $shelflist->[0] }) { > push(@shelvesloop, $shelf->{shelfnumber}); > $shelvesloop{$shelf->{shelfnumber}} = $shelf->{shelfname}; >diff --git a/virtualshelves/addbybiblionumber.pl b/virtualshelves/addbybiblionumber.pl >index a0d9fdd..c2ee59c 100755 >--- a/virtualshelves/addbybiblionumber.pl >+++ b/virtualshelves/addbybiblionumber.pl >@@ -153,7 +153,7 @@ if ( $shelfnumber || ( $shelfnumber == -1 ) ) { # the shelf already exist. > } > else { # this shelf doesn't already exist. > my $limit = 10; >- my ($shelflist); >+ my ($shelflist) = GetRecentShelves(1, undef, $loggedinuser); > my @shelvesloop; > my %shelvesloop; > >-- >1.7.1 >
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 5994
: 3507