Bugzilla – Attachment 2648 Details for
Bug 5232
Shelfname does not display on high numbered lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-Fixes-bug-5232-Shelfname-won-t-display-on-high-numb.patch (text/plain), 2.71 KB, created by
Nicole C. Engard
on 2010-09-25 16:55:53 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2010-09-25 16:55:53 UTC
Size:
2.71 KB
patch
obsolete
>From 400a0a47a2739b34ddb90bd81bea76617216163b Mon Sep 17 00:00:00 2001 >From: Ian Walls <ian.walls@bywatersolutions.com> >Date: Fri, 17 Sep 2010 12:22:01 -0400 >Subject: [PATCH] Fixes bug 5232: Shelfname won't display on high-numbered lists >Content-Type: text/plain; charset="utf-8" > >This bugfix adds an explicit GetShelf for the specific shelfnumber when viewing that individual shelfnumber. This captures the >shelfname, which was originally pulled from shelflist->{$shelfnumber}, which may not have been populated if the List in question was >beyond the 20th private or public list in the system. > >Also adds a more explicit sort: the sort from the CGI takes top priority, then it falls back to the default sort for the list, and >ultimate falls to 'title' if neither CGI nor default sort exist. > >Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> >--- > C4/VirtualShelves/Page.pm | 15 ++++++++++++--- > 1 files changed, 12 insertions(+), 3 deletions(-) > >diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm >index 73ca42d..87f1ef6 100644 >--- a/C4/VirtualShelves/Page.pm >+++ b/C4/VirtualShelves/Page.pm >@@ -173,13 +173,22 @@ sub shelfpage ($$$$$) { > last SWITCH; > } > if ( $shelfnumber = $query->param('viewshelf') ) { >+ # explicitly fetch this shelf >+ my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber); > > #check that the user can view the shelf > if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'view' ) ) { > my $items; > my $authorsort; > my $yearsort; >- my $sortfield = ( $query->param('sortfield') ? $query->param('sortfield') : 'title' ); >+ my $sortfield; >+ if ( $query->param('sortfield')) { >+ $sortfield = $query->param('sortfield'); >+ } elsif ($sorton) { >+ $sortfield = $sorton; >+ } else { >+ $sortfield = 'title'; >+ } > if ( $sortfield eq 'author' ) { > $authorsort = 'author'; > } >@@ -209,7 +218,7 @@ sub shelfpage ($$$$$) { > my $i = 0; > my $manageshelf = ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' ); > $template->param( >- shelfname => $shelflist->{$shelfnumber}->{'shelfname'} || $privshelflist->{$shelfnumber}->{'shelfname'}, >+ shelfname => $shelfname, > shelfnumber => $shelfnumber, > viewshelf => $shelfnumber, > authorsort => $authorsort, >@@ -426,4 +435,4 @@ __END__ > > =back > >-=cut >\ No newline at end of file >+=cut >-- >1.5.6.5 >
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 5232
: 2648