Bug 32205: Remove unnecessary syspref template params for failed OPAC auth
authorDavid Cook <dcook@prosentient.com.au>
Tue, 15 Nov 2022 01:25:42 +0000 (01:25 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 27 Feb 2023 14:38:33 +0000 (11:38 -0300)
This patch removes some unnecessary syspref template params for
failed OPAC auth. The templates handle these syspref using the
Koha.Preference() TT plugin function, so they're completely redundant
and just make checkauth() longer than it needs to be.

Test plan:
1) Apply patch
2) Enable OpacCloud, OpacBrowser, and OpacTopissue sysprefs
3) koha-plack --restart kohadev
4) Log out of Koha if you're logged in
5) Go to http://localhost:8080/cgi-bin/koha/opac-user.pl
6) Note that you can see the Cart as well as links for the following:
Browse by hierarchy, Authority search, Tag cloud, Subject cloud,
Most popular

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Auth.pm

index 8e5b5f6..5659351 100644 (file)
@@ -1362,12 +1362,6 @@ sub checkauth {
         opacreadinghistory                    => C4::Context->preference("opacreadinghistory"),
         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"),
-        TagsEnabled                           => C4::Context->preference("TagsEnabled"),
         OPACUserCSS                           => C4::Context->preference("OPACUserCSS"),
         intranetcolorstylesheet               => C4::Context->preference("intranetcolorstylesheet"),
         intranetstylesheet                    => C4::Context->preference("intranetstylesheet"),