- my ($total, $pubshelves, $barshelves) = C4::Context->get_shelves_userenv();
- if (defined($pubshelves)) {
- $template->param( pubshelves => scalar (@$pubshelves),
- pubshelvesloop => $pubshelves,
- );
- $template->param( pubtotal => $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar (@$pubshelves));
- }
- if (defined($barshelves)) {
- $template->param( barshelves => scalar (@$barshelves),
- barshelvesloop => $barshelves,
- );
- $template->param( bartotal => $total->{'bartotal'}, ) if ($total->{'bartotal'} > scalar (@$barshelves));
- }
+ my ($total, $pubshelves, $barshelves) = C4::Context->get_shelves_userenv();
+ if (defined($pubshelves)) {
+ $template->param( pubshelves => scalar @{$pubshelves},
+ pubshelvesloop => $pubshelves,
+ );
+ $template->param( pubtotal => $total->{'pubtotal'}, ) if ($total->{'pubtotal'} > scalar @{$pubshelves});
+ }
+ if (defined($barshelves)) {
+ $template->param( barshelves => scalar @{$barshelves},
+ barshelvesloop => $barshelves,
+ );
+ $template->param( bartotal => $total->{'bartotal'}, ) if ($total->{'bartotal'} > scalar @{$barshelves});
+ }