From 517c5c0e98da23362636c35cd7bee86a6cc46148 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 23 May 2013 17:28:25 +0200 Subject: [PATCH] Bug 8952: using_https does not deal with Plack When using Plack, the https method returns 'OFF'. We have to test this value before sending the value to templates. Test plan: - Check the social networks link under Plack - Check the social networks link without Plack --- C4/Auth.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 9dba387..d7f182f 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -306,6 +306,7 @@ sub get_template_and_user { } # these template parameters are set the same regardless of $in->{'type'} + my $https = $in->{query}->https(); $template->param( "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), @@ -324,7 +325,7 @@ sub get_template_and_user { singleBranchMode => C4::Context->preference("singleBranchMode"), XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"), XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"), - using_https => $in->{'query'}->https() ? 1 : 0, + using_https => (defined $https and $https ne 'OFF') ? 1 : 0, noItemTypeImages => C4::Context->preference("noItemTypeImages"), marcflavour => C4::Context->preference("marcflavour"), persona => C4::Context->preference("persona"), -- 1.7.10.4