X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FAuth.pm;h=06806ff065431b776f8a75e6f475f70b7fd782f6;hb=7f0a326da5bb347310e60103bd3486b22a495743;hp=2f13b863e99aace18bcdc0083d9a9aa00ecf0f55;hpb=826eda9d7045e970e6989fef7feb5f013e81e675;p=srvgit diff --git a/C4/Auth.pm b/C4/Auth.pm index 2f13b863e9..06806ff065 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -232,7 +232,7 @@ sub get_template_and_user { } # 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); @@ -332,7 +332,7 @@ sub get_template_and_user { 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"), @@ -418,6 +418,7 @@ sub get_template_and_user { 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"), @@ -455,6 +456,8 @@ sub get_template_and_user { 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); @@ -941,8 +944,10 @@ sub checkauth { 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) {