From c58c6c219c196f1a8b2f5d3bb85db6bd9ccb9500 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 21 Apr 2011 11:37:44 +1200 Subject: [PATCH] Bug 6215 : Fixing a bug with virtuallists Signed-off-by: Chris Cormack --- C4/VirtualShelves/Page.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index cb55b9c46f..9e5ec3ae6e 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -56,7 +56,7 @@ sub shelfpage ($$$$$) { ( $pages{$type} ) or $type = 'opac'; $query or die "No query"; $template or die "No template"; - $template->param( { loggedinuser => $loggedinuser } ); + $template->param( loggedinuser => $loggedinuser ); my $edit; my $shelves; my @paramsloop; @@ -315,7 +315,10 @@ sub shelfpage ($$$$$) { $stay = 0; } $showadd = 1; - $stay and $template->param( shelves => 1 ) and $shelves = 1; + if ($stay){ + $template->param( shelves => 1 ); + $shelves = 1; + } last SWITCH; } } @@ -363,10 +366,10 @@ sub shelfpage ($$$$$) { } ( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash; if ( $shelfnumber ) { - $template->param( { pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" ) } ); + $template->param( pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" ) ); } else { $template->param( - { pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" ) } ); + pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" ) ); } $template->param( shelveslooppriv => \@shelveslooppriv, -- 2.39.2