From: Jonathan Druart Date: Wed, 27 Jan 2021 11:03:33 +0000 (+0100) Subject: Bug 14004: Set the syspref's value to an empty string X-Git-Tag: v21.05.00~1394 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=6b23c0634b43a60f0a434d4c43a3e57718ad0806;p=srvgit Bug 14004: Set the syspref's value to an empty string It's tested with "defined" in C4::Context->preference Signed-off-by: Fridolin Somers Signed-off-by: Jonathan Druart --- diff --git a/C4/Auth.pm b/C4/Auth.pm index 5e44bd1c40..f4e0b903ae 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -442,11 +442,21 @@ sub get_template_and_user { # Sysprefs disabled via URL param # Note that value must be defined in order to override via ENV - foreach my $syspref ( qw( OPACUserCSS OPACUserJS IntranetUserCSS IntranetUserJS ) ) { - $ENV{"OVERRIDE_SYSPREF_$syspref"} = q{ } if $in->{'query'}->param("DISABLE_SYSPREF_$syspref"); - } - foreach my $syspref ( qw( OpacAdditionalStylesheet opaclayoutstylesheet intranetcolorstylesheet intranetstylesheet ) ) { - $ENV{"OVERRIDE_SYSPREF_$syspref"} = 0 if $in->{'query'}->param("DISABLE_SYSPREF_$syspref"); + foreach my $syspref ( + qw( + OPACUserCSS + OPACUserJS + IntranetUserCSS + IntranetUserJS + OpacAdditionalStylesheet + opaclayoutstylesheet + intranetcolorstylesheet + intranetstylesheet + ) + ) + { + $ENV{"OVERRIDE_SYSPREF_$syspref"} = q{} + if $in->{'query'}->param("DISABLE_SYSPREF_$syspref"); } # Anonymous opac search history