From 446e143c6dcd1ce5500091748c926d4e1a8fcef3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 27 Jan 2021 12:03:33 +0100 Subject: [PATCH] Bug 14004: Set the syspref's value to an empty string It's tested with "defined" in C4::Context->preference --- C4/Auth.pm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index cef3cb4755..e0b27dbce0 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -442,11 +442,19 @@ 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( intranetcolorstylesheet intranetstylesheet ) ) { - $ENV{"OVERRIDE_SYSPREF_$syspref"} = 0 if $in->{'query'}->param("DISABLE_SYSPREF_$syspref"); + foreach my $syspref ( + qw( + OPACUserCSS + OPACUserJS + IntranetUserCSS + IntranetUserJS + intranetcolorstylesheet + intranetstylesheet + ) + ) + { + $ENV{"OVERRIDE_SYSPREF_$syspref"} = q{} + if $in->{'query'}->param("DISABLE_SYSPREF_$syspref"); } # Anonymous opac search history -- 2.20.1