X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=opac%2Fopac-search.pl;h=363a11ea0eaadbff48d6ed88a05467c9c2646d58;hb=f85fb5e5ed32469c9eb261803be7211694423e36;hp=3ca9d1d5d509f3c9ebc76f3cc4b3d35e1f931d6e;hpb=d542740ab8877234d043c8a11cb19a6004e72656;p=koha_fer diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 3ca9d1d5d5..363a11ea0e 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -60,7 +60,7 @@ use Business::ISBN; 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"); @@ -652,7 +652,7 @@ for (my $i=0;$i<@servers;$i++) { $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]; @@ -715,8 +715,10 @@ for (my $i=0;$i<@servers;$i++) { $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 )