Bugzilla – Attachment 55111 Details for
Bug 17240
Allow processes that rely on background jobs run in Plack mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17240 - Allow processes that rely on background jobs run in Plack mode - prepare
Bug-17240---Allow-processes-that-rely-on-backgroun.patch (text/plain), 1.68 KB, created by
Fridolin Somers
on 2016-09-02 10:34:38 UTC
(
hide
)
Description:
Bug 17240 - Allow processes that rely on background jobs run in Plack mode - prepare
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2016-09-02 10:34:38 UTC
Size:
1.68 KB
patch
obsolete
>From 87ddf834a0a888418febf8d4da1924383717438a Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 2 Sep 2016 12:30:33 +0200 >Subject: [PATCH] Bug 17240 - Allow processes that rely on background jobs run > in Plack mode - prepare > >This adds prepares the main one by adding method "is_psgi" to C4::Context and using it in about.pl > >Test plan : >- On a Koha running with Plack >- Go to about.pl >- Look at line "PGSI:" >=> You should see "Plack" >--- > C4/Context.pm | 13 +++++++++++++ > about.pl | 3 +-- > 2 files changed, 14 insertions(+), 2 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 4ff47af..d68b08a 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -113,6 +113,7 @@ use POSIX (); > use DateTime::TimeZone; > use Module::Load::Conditional qw(can_load); > use Carp; >+use List::MoreUtils qw(any); > > use C4::Boolean; > use C4::Debug; >@@ -1140,6 +1141,18 @@ sub interface { > return $context->{interface} // 'opac'; > } > >+=head2 interface >+ >+ C4::Context->is_psgi >+ >+ Returns if using PSGI mode (Plack) instead of CGI mode >+ >+=cut >+ >+sub is_psgi { >+ return any { /(^psgi\.|^plack\.)/i } keys %ENV; >+} >+ > 1; > __END__ > >diff --git a/about.pl b/about.pl >index ca8ff9f..467b99a 100755 >--- a/about.pl >+++ b/about.pl >@@ -23,7 +23,6 @@ > use Modern::Perl; > > use CGI qw ( -utf8 ); >-use List::MoreUtils qw/ any /; > use LWP::Simple; > use XML::Simple; > use Config; >@@ -61,7 +60,7 @@ if ($^O ne 'VMS') { > my $zebraVersion = `zebraidx -V`; > > # Check running PSGI env >-if ( any { /(^psgi\.|^plack\.)/i } keys %ENV ) { >+if ( C4::Context->is_psgi ) { > $template->param( > is_psgi => 1, > psgi_server => ($ENV{ PLACK_ENV }) ? "Plack ($ENV{PLACK_ENV})" : >-- >2.7.4
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 17240
:
55110
|
55111
|
55129
|
55130
|
55137
|
55138
|
55257
|
58461
|
63291
|
63459
|
63862
|
76477
|
76478
|
76479
|
76480
|
76481
|
76482