my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold");
# create a new CGI object
# FIXME: no_undef_params needs to be tested
-use CGI qw( -no_undef_params -utf8 );
+use CGI qw('-no_undef_params');
my $cgi = new CGI;
my $branch_group_limit = $cgi->param("branch_group_limit");
$newsearchcookie = $cgi->cookie(
-name => 'KohaOpacRecentSearches',
# We uri_escape the whole freezed structure so we're sure we won't have any encoding problems
- -value => uri_escape_utf8(freeze(\@recentSearches)),
+ -value =>freeze(\@recentSearches),
-expires => ''
);
$cookie = [$cookie, $newsearchcookie];
$template->param(results_per_page => $results_per_page);
my $hide = C4::Context->preference('OpacHiddenItems');
$hide = ($hide =~ m/\S/) if $hide; # Just in case it has some spaces/new lines
-
- my $branch = C4::Context->userenv->{branch};
+ my $branch = '';
+ if (C4::Context->userenv){
+ $branch = C4::Context->userenv->{branch};
+ }
if ( C4::Context->preference('HighlightOwnItemsOnOPAC') ) {
if (
( ( C4::Context->preference('HighlightOwnItemsOnOPACWhich') eq 'PatronBranch' ) && $branch )