Bugzilla – Attachment 193519 Details for
Bug 41895
Introduce Koha::Context::UserEnv to reduce circ deps problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41895: Fix if no userenv defined
241b789.patch (text/plain), 1.29 KB, created by
Jonathan Druart
on 2026-02-20 10:46:06 UTC
(
hide
)
Description:
Bug 41895: Fix if no userenv defined
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-02-20 10:46:06 UTC
Size:
1.29 KB
patch
obsolete
>From 241b78953c14087c975954fc233f0089cb152160 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 20 Feb 2026 11:41:16 +0100 >Subject: [PATCH] Bug 41895: Fix if no userenv defined > >--- > C4/Context.pm | 4 +--- > Koha/Context/UserEnv.pm | 2 -- > 2 files changed, 1 insertion(+), 5 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 5da92e83f9a..27525a77b6c 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -21,8 +21,6 @@ use Modern::Perl; > > use vars qw($AUTOLOAD $context); > >-our $REQUEST_ENV; >- > BEGIN { > if ( $ENV{'HTTP_USER_AGENT'} ) { # Only hit when plack is not enabled > >@@ -649,7 +647,7 @@ Retrieves a hash for user environment variables. > =cut > > sub userenv { >- return Koha::Context::UserEnv->get_all(); >+ return Koha::Context::UserEnv->get_all() if Koha::Context::UserEnv->exists(); > } > > =head2 set_userenv_from_session >diff --git a/Koha/Context/UserEnv.pm b/Koha/Context/UserEnv.pm >index 751bcc973df..30dd5679b07 100644 >--- a/Koha/Context/UserEnv.pm >+++ b/Koha/Context/UserEnv.pm >@@ -10,8 +10,6 @@ sub attach { > die "userenv must be hashref" > unless ref $userenv eq 'HASH'; > >- die "No request env" unless $REQUEST_ENV; >- > $REQUEST_ENV->{'koha.userenv'} = $userenv; > return $userenv; > } >-- >2.43.0 >
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 41895
:
193511
|
193516
| 193519