Bugzilla – Attachment 21361 Details for
Bug 8952
Add http:// to url in social media links on opac-detail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8952: using_https does not deal with Plack
Bug-8952-usinghttps-does-not-deal-with-Plack.patch (text/plain), 2.61 KB, created by
Marcel de Rooy
on 2013-09-23 11:44:48 UTC
(
hide
)
Description:
Bug 8952: using_https does not deal with Plack
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-09-23 11:44:48 UTC
Size:
2.61 KB
patch
obsolete
>From 755efcf3a65488d660befc64a6b2eae7b45f2340 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 23 May 2013 17:28:25 +0200 >Subject: [PATCH] Bug 8952: using_https does not deal with Plack >Content-Type: text/plain; charset=utf-8 > >When using Plack, the https method returns 'OFF'. >We have to test this value before sending the value to templates. > >Test plan: >1/ Fill your OPACBaseUrl > >2/ Configure apache for using http >3/ Check the social networks links (should be http://OPACBaseUrl) > >4/ Launch Plack >5/ Check the social networks link (should be http://OPACBaseUrl) >6/ Stop Plack > >7/ Configure apache for using https > sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -out >/etc/apache2/server.crt -keyout /etc/apache2/server.key >and add in you virtualhost (with :443) > SSLEngine on > SSLCertificateFile /etc/apache2/server.crt > SSLCertificateKeyFile /etc/apache2/server.key > a2enmod ssl > service apache2 restart >8/ Check the social networks links (should be https://OPACBaseUrl) > >FIXME: Under Plack, with ssl actived, the CGI->https() method always >returns 'OFF'. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Auth.pm | 8 +++++++- > 1 files changed, 7 insertions(+), 1 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 1e17e59..8eae728 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -299,6 +299,12 @@ sub get_template_and_user { > } > > # these template parameters are set the same regardless of $in->{'type'} >+ >+ # Set the using_https variable for templates >+ # FIXME Under Plack the CGI->https method always returns 'OFF' >+ my $https = $in->{query}->https(); >+ my $using_https = (defined $https and $https ne 'OFF') ? 1 : 0; >+ > $template->param( > "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, > EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), >@@ -317,7 +323,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 => $using_https, > noItemTypeImages => C4::Context->preference("noItemTypeImages"), > marcflavour => C4::Context->preference("marcflavour"), > persona => C4::Context->preference("persona"), >-- >1.7.7.6
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8952
:
13023
|
13033
|
13034
|
14291
|
14292
|
14614
|
16019
|
16020
|
18327
|
18328
|
18353
|
18369
|
21359
|
21360
| 21361