Bugzilla – Attachment 140692 Details for
Bug 29744
Harmonize psgi/plack detection methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29744: (QA follow-up) Call psgi_env in OO style
Bug-29744-QA-follow-up-Call-psgienv-in-OO-style.patch (text/plain), 3.24 KB, created by
Marcel de Rooy
on 2022-09-16 07:54:10 UTC
(
hide
)
Description:
Bug 29744: (QA follow-up) Call psgi_env in OO style
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-09-16 07:54:10 UTC
Size:
3.24 KB
patch
obsolete
>From 92f90c226e044feaedbdd3dde128509b5c827208 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 16 Sep 2022 07:20:36 +0000 >Subject: [PATCH] Bug 29744: (QA follow-up) Call psgi_env in OO style >Content-Type: text/plain; charset=utf-8 > >Result of git grep -l -E "::psgi_env" | xargs sed -i -e's/::psgi_env/->psgi_env/g' > >Also resolving this warn from Auth.t: >Use of uninitialized value $ENV{"SCRIPT_NAME"} in pattern match (m//) at /usr/share/koha/Koha/AuthUtils.pm line 211. > >Note that the following warn is resolved on report 30588 (underway). >Use of uninitialized value $return in numeric gt (>) at /usr/share/koha/C4/Auth.pm line 1154. > >Test plan: >Run t/db_dependent/Auth.t >Hit some opac, intranet pages. API call. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Auth_with_shibboleth.pm | 6 +++--- > Koha/AuthUtils.pm | 2 +- > about.pl | 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm >index 1eb14edc67..5a46737c59 100644 >--- a/C4/Auth_with_shibboleth.pm >+++ b/C4/Auth_with_shibboleth.pm >@@ -81,7 +81,7 @@ sub get_login_shib { > > my $matchAttribute = $config->{mapping}->{ $config->{matchpoint} }->{is}; > >- if ( C4::Context::psgi_env ) { >+ if ( C4::Context->psgi_env ) { > return $ENV{"HTTP_".uc($matchAttribute)} || ''; > } else { > return $ENV{$matchAttribute} || ''; >@@ -126,7 +126,7 @@ sub _autocreate { > my %borrower = ( $config->{matchpoint} => $match ); > > while ( my ( $key, $entry ) = each %{$config->{'mapping'}} ) { >- if ( C4::Context::psgi_env ) { >+ if ( C4::Context->psgi_env ) { > $borrower{$key} = ( $entry->{'is'} && $ENV{"HTTP_" . uc($entry->{'is'}) } ) || $entry->{'content'} || ''; > } else { > $borrower{$key} = ( $entry->{'is'} && $ENV{ $entry->{'is'} } ) || $entry->{'content'} || ''; >@@ -144,7 +144,7 @@ sub _sync { > my %borrower; > $borrower{'borrowernumber'} = $borrowernumber; > while ( my ( $key, $entry ) = each %{$config->{'mapping'}} ) { >- if ( C4::Context::psgi_env ) { >+ if ( C4::Context->psgi_env ) { > $borrower{$key} = ( $entry->{'is'} && $ENV{"HTTP_" . uc($entry->{'is'}) } ) || $entry->{'content'} || ''; > } else { > $borrower{$key} = ( $entry->{'is'} && $ENV{ $entry->{'is'} } ) || $entry->{'content'} || ''; >diff --git a/Koha/AuthUtils.pm b/Koha/AuthUtils.pm >index 1a1ccba830..6a8c009bb1 100644 >--- a/Koha/AuthUtils.pm >+++ b/Koha/AuthUtils.pm >@@ -208,7 +208,7 @@ outside this context. > =cut > > sub get_script_name { >- if ( ( C4::Context::psgi_env ) && $ENV{SCRIPT_NAME} =~ m,^/(intranet|opac)(.*), ) { >+ if ( ( C4::Context->psgi_env ) && $ENV{SCRIPT_NAME} && $ENV{SCRIPT_NAME} =~ m,^/(intranet|opac)(.*), ) { > return '/cgi-bin/koha' . $2; > } else { > return $ENV{SCRIPT_NAME}; >diff --git a/about.pl b/about.pl >index c9b229b55a..30e943b67e 100755 >--- a/about.pl >+++ b/about.pl >@@ -125,7 +125,7 @@ if ($^O ne 'VMS') { > my $zebraVersion = `zebraidx -V`; > > # Check running PSGI env >-if ( C4::Context::psgi_env ) { >+if ( C4::Context->psgi_env ) { > $template->param( > is_psgi => 1, > psgi_server => ($ENV{ PLACK_ENV }) ? "Plack ($ENV{PLACK_ENV})" : >-- >2.30.2
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 29744
:
132299
|
132975
|
133429
|
133430
|
140689
|
140690
|
140691
| 140692 |
140922