Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 6215 : Fixing a bug with virtuallists

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
  • Loading branch information...
commit c58c6c219c196f1a8b2f5d3bb85db6bd9ccb9500 1 parent f9554ea
@ranginui ranginui authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 C4/VirtualShelves/Page.pm
View
11 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,
Please sign in to comment.
Something went wrong with that request. Please try again.