}
# Logged-in opac search history
# If the requested template is an opac one and opac search history is enabled
- if ($in->{'type'} == "opac" && C4::Context->preference('EnableOpacSearchHistory')) {
+ if ($in->{type} eq 'opac' && C4::Context->preference('EnableOpacSearchHistory')) {
my $dbh = C4::Context->dbh;
my $query = "SELECT COUNT(*) FROM search_history WHERE userid=?";
my $sth = $dbh->prepare($query);
LoginSurname => C4::Context->userenv?C4::Context->userenv->{"surname"}:"Inconnu",
TagsEnabled => C4::Context->preference("TagsEnabled"),
hide_marc => C4::Context->preference("hide_marc"),
- 'item-level_itypes' => C4::Context->preference('item-level_itypes'),
+ item_level_itypes => C4::Context->preference('item-level_itypes'),
patronimages => C4::Context->preference("patronimages"),
singleBranchMode => C4::Context->preference("singleBranchMode"),
XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
OpacNav => "" . C4::Context->preference("OpacNav"),
OpacPasswordChange => C4::Context->preference("OpacPasswordChange"),
OPACPatronDetails => C4::Context->preference("OPACPatronDetails"),
+ OPACPrivacy => C4::Context->preference("OPACPrivacy"),
OPACFinesTab => C4::Context->preference("OPACFinesTab"),
OpacTopissue => C4::Context->preference("OpacTopissue"),
RequestOnOpac => C4::Context->preference("RequestOnOpac"),
SyndeticsSeries => C4::Context->preference("SyndeticsSeries"),
SyndeticsCoverImageSize => C4::Context->preference("SyndeticsCoverImageSize"),
);
+
+ $template->param(OpacPublic => '1') if ($template->param( 'loggedinusername') || C4::Context->preference("OpacPublic"));
}
$template->param(listloop=>[{shelfname=>"Freelist", shelfnumber=>110}]);
return ( $template, $borrowernumber, $cookie, $flags);
intranetuserjs => C4::Context->preference("intranetuserjs"),
IndependantBranches=> C4::Context->preference("IndependantBranches"),
AutoLocation => C4::Context->preference("AutoLocation"),
- wrongip => $info{'wrongip'}
+ wrongip => $info{'wrongip'},
);
+
+ $template->param( OpacPublic => C4::Context->preference("OpacPublic"));
$template->param( loginprompt => 1 ) unless $info{'nopermission'};
if ($cas) {