Bugzilla – Attachment 5303 Details for
Bug 6555
only 10 lists in pull down when adding from a bib record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6555 : only 10 lists show in the staff client
Bug-6555--only-10-lists-show-in-the-staff-client.patch (text/plain), 2.21 KB, created by
Chris Cormack
on 2011-09-04 23:28:10 UTC
(
hide
)
Description:
Bug 6555 : only 10 lists show in the staff client
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-09-04 23:28:10 UTC
Size:
2.21 KB
patch
obsolete
>From 3c7f40f5910be55acfba0ffa3debef33bd88a120 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Mon, 5 Sep 2011 11:27:40 +1200 >Subject: [PATCH] Bug 6555 : only 10 lists show in the staff client > >--- > C4/VirtualShelves.pm | 10 +++++++--- > virtualshelves/addbybiblionumber.pl | 4 ++-- > 2 files changed, 9 insertions(+), 5 deletions(-) > >diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm >index df54de8..57b86da 100644 >--- a/C4/VirtualShelves.pm >+++ b/C4/VirtualShelves.pm >@@ -203,15 +203,19 @@ sub GetRecentShelves { > my @params; > my $selection; > if (defined $owner) { >- @params = ($owner, $mincategory, $row_count); >+ @params = ($owner, $mincategory); > $selection = ' WHERE owner = ? AND category = ?'; > } else { >- @params = ( $mincategory, $row_count); >+ @params = ( $mincategory); > $selection = ' WHERE category >= ? '; > } > my $query = 'SELECT * FROM virtualshelves'; > $query .= $selection; >- $query .= ' ORDER BY lastmodified DESC LIMIT ?'; >+ $query .= ' ORDER BY lastmodified DESC'; >+ if ($row_count){ >+ $query .= ' LIMIT ?'; >+ push @params,$row_count; >+ } > my $sth = $dbh->prepare($query); > $sth->execute(@params); > my $shelflist = $sth->fetchall_arrayref({}); >diff --git a/virtualshelves/addbybiblionumber.pl b/virtualshelves/addbybiblionumber.pl >index f1ac674..1dbffbb 100755 >--- a/virtualshelves/addbybiblionumber.pl >+++ b/virtualshelves/addbybiblionumber.pl >@@ -152,14 +152,14 @@ if ( $shelfnumber || ( $shelfnumber == -1 ) ) { # the shelf already exist. > } > } > else { # this shelf doesn't already exist. >- my $limit = 10; >+# my $limit = 10; > my ($shelflist); > my @shelvesloop; > 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, undef, $shelftype == 3 ? undef : $loggedinuser); > for my $shelf (@{ $shelflist }) { > push(@shelvesloop, $shelf->{shelfnumber}); > $shelvesloop{$shelf->{shelfnumber}} = $shelf->{shelfname}; >-- >1.7.4.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 6555
:
4559
|
5303
|
5319