From 910400487372efe17d901584d2dc0e79447edaf5 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 27 Jan 2023 13:00:51 +0000 Subject: [PATCH] Bug 32721: Tidy up - duplicate fetching of userjs and css Currently UserJS and UserCSS is injected into the template as a parameter through Auth.pm but is then fetched using Koha.Preference() in the template. This patch tidies this up by removing the parameters from Auth.pm Test plan as per first commit Signed-off-by: Lucas Gass --- C4/Auth.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index adc1b5dd0d..d3e09ff281 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -562,7 +562,6 @@ sub get_template_and_user { OpacHighlightedWords => C4::Context->preference("OpacHighlightedWords"), OPACShelfBrowser => "" . C4::Context->preference("OPACShelfBrowser"), OPACURLOpenInNewWindow => "" . C4::Context->preference("OPACURLOpenInNewWindow"), - OPACUserCSS => "" . C4::Context->preference("OPACUserCSS"), OpacAuthorities => C4::Context->preference("OpacAuthorities"), opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, opac_search_limit => $opac_search_limit, @@ -582,7 +581,6 @@ sub get_template_and_user { OpacFavicon => C4::Context->preference("OpacFavicon"), opaclanguagesdisplay => "" . C4::Context->preference("opaclanguagesdisplay"), opacreadinghistory => C4::Context->preference("opacreadinghistory"), - OPACUserJS => C4::Context->preference("OPACUserJS"), opacuserlogin => "" . C4::Context->preference("opacuserlogin"), OpenLibrarySearch => C4::Context->preference("OpenLibrarySearch"), ShowReviewer => C4::Context->preference("ShowReviewer"), @@ -1362,6 +1360,12 @@ sub checkauth { OpacFavicon => C4::Context->preference("OpacFavicon"), opacreadinghistory => C4::Context->preference("opacreadinghistory"), opaclanguagesdisplay => C4::Context->preference("opaclanguagesdisplay"), + 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"), + TagsEnabled => C4::Context->preference("TagsEnabled"), OPACUserJS => C4::Context->preference("OPACUserJS"), OPACUserCSS => C4::Context->preference("OPACUserCSS"), intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), -- 2.37.1 (Apple Git-137.1)