From 0f5dc609e0d94e804869b5994ba2b19bc97980ac Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 15 Oct 2013 15:27:59 +0000 Subject: [PATCH] Bug 10309: (follow-up) restore setting some OPAC template variables in C4::Auth These variables still need to be exported to the template by default for the 'prog' OPAC template to work correctly. Signed-off-by: Galen Charlton --- C4/Auth.pm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 5ad7e25cce..d73edaf5f7 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -319,6 +319,7 @@ sub get_template_and_user { LoginSurname => C4::Context->userenv?C4::Context->userenv->{"surname"}:"Inconnu", emailaddress => C4::Context->userenv?C4::Context->userenv->{"emailaddress"}:undef, loggedinpersona => C4::Context->userenv?C4::Context->userenv->{"persona"}:undef, + TagsEnabled => C4::Context->preference("TagsEnabled"), hide_marc => C4::Context->preference("hide_marc"), item_level_itypes => C4::Context->preference('item-level_itypes'), patronimages => C4::Context->preference("patronimages"), @@ -360,7 +361,6 @@ sub get_template_and_user { OPACLocalCoverImages => C4::Context->preference('OPACLocalCoverImages'), AllowMultipleCovers => C4::Context->preference('AllowMultipleCovers'), EnableBorrowerFiles => C4::Context->preference('EnableBorrowerFiles'), - TagsEnabled => C4::Context->preference("TagsEnabled"), UseKohaPlugins => C4::Context->preference('UseKohaPlugins'), UseCourseReserves => C4::Context->preference("UseCourseReserves"), ); @@ -389,6 +389,7 @@ sub get_template_and_user { } $template->param( opaccolorstylesheet => C4::Context->preference("opaccolorstylesheet"), + AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), BranchesLoop => GetBranchesLoop($opac_name), BranchCategoriesLoop => GetBranchCategories( 'searchdomain', 1, $opac_name ), @@ -404,11 +405,15 @@ sub get_template_and_user { OPACURLOpenInNewWindow => "" . C4::Context->preference("OPACURLOpenInNewWindow"), OPACUserCSS => "". C4::Context->preference("OPACUserCSS"), OPACMobileUserCSS => "". C4::Context->preference("OPACMobileUserCSS"), + OPACViewOthersSuggestions => "" . C4::Context->preference("OPACViewOthersSuggestions"), + OpacAuthorities => C4::Context->preference("OpacAuthorities"), OPACBaseURL => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} . ($ENV{'SERVER_PORT'} eq ($in->{'query'}->https() ? "443" : "80") ? '' : ":$ENV{'SERVER_PORT'}"), opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, opac_search_limit => $opac_search_limit, opac_limit_override => $opac_limit_override, + OpacBrowser => C4::Context->preference("OpacBrowser"), + OpacCloud => C4::Context->preference("OpacCloud"), OpacKohaUrl => C4::Context->preference("OpacKohaUrl"), OpacMainUserBlock => "" . C4::Context->preference("OpacMainUserBlock"), OpacMainUserBlockMobile => "" . C4::Context->preference("OpacMainUserBlockMobile"), @@ -421,10 +426,13 @@ sub get_template_and_user { 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"), 'Version' => C4::Context->preference('Version'), hidelostitems => C4::Context->preference("hidelostitems"), mylibraryfirst => (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv) ? C4::Context->userenv->{'branch'} : '', opaclayoutstylesheet => "" . C4::Context->preference("opaclayoutstylesheet"), + opacbookbag => "" . C4::Context->preference("opacbookbag"), opaccredits => "" . C4::Context->preference("opaccredits"), OpacFavicon => C4::Context->preference("OpacFavicon"), opacheader => "" . C4::Context->preference("opacheader"), @@ -435,6 +443,7 @@ sub get_template_and_user { opacuserlogin => "" . C4::Context->preference("opacuserlogin"), ShowReviewer => C4::Context->preference("ShowReviewer"), ShowReviewerPhoto => C4::Context->preference("ShowReviewerPhoto"), + suggestion => "" . C4::Context->preference("suggestion"), virtualshelves => "" . C4::Context->preference("virtualshelves"), OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"), OPACXSLTDetailsDisplay => C4::Context->preference("OPACXSLTDetailsDisplay"), @@ -999,6 +1008,7 @@ sub checkauth { login => 1, INPUTS => \@inputs, casAuthentication => C4::Context->preference("casAuthentication"), + suggestion => C4::Context->preference("suggestion"), virtualshelves => C4::Context->preference("virtualshelves"), LibraryName => "" . C4::Context->preference("LibraryName"), LibraryNameTitle => "" . $LibraryNameTitle, @@ -1012,6 +1022,11 @@ sub checkauth { opacsmallimage => C4::Context->preference("opacsmallimage"), opaclanguagesdisplay => C4::Context->preference("opaclanguagesdisplay"), opacuserjs => C4::Context->preference("opacuserjs"), + opacbookbag => "" . C4::Context->preference("opacbookbag"), + OpacCloud => C4::Context->preference("OpacCloud"), + OpacTopissue => C4::Context->preference("OpacTopissue"), + OpacAuthorities => C4::Context->preference("OpacAuthorities"), + OpacBrowser => C4::Context->preference("OpacBrowser"), opacheader => C4::Context->preference("opacheader"), TagsEnabled => C4::Context->preference("TagsEnabled"), OPACUserCSS => C4::Context->preference("OPACUserCSS"), -- 2.39.5