Bugzilla – Attachment 162204 Details for
Bug 36098
Create Koha::Session module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36098: Allow to pass storage_method
Bug-36098-Allow-to-pass-storagemethod.patch (text/plain), 1.40 KB, created by
Jonathan Druart
on 2024-02-15 13:05:46 UTC
(
hide
)
Description:
Bug 36098: Allow to pass storage_method
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-02-15 13:05:46 UTC
Size:
1.40 KB
patch
obsolete
>From 5f901151e4b4d2c10b401cebac7413539c50736e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 15 Feb 2024 14:05:21 +0100 >Subject: [PATCH] Bug 36098: Allow to pass storage_method > >Will need this on follow-up bugs. >--- > Koha/Session.pm | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/Koha/Session.pm b/Koha/Session.pm >index 68a7b2787a2..f3ac4c7b249 100644 >--- a/Koha/Session.pm >+++ b/Koha/Session.pm >@@ -22,8 +22,8 @@ use C4::Context; > use Koha::Caches; > > sub _get_session_params { >- my $class = shift; >- my $storage_method = C4::Context->preference('SessionStorage'); >+ my ( $class, $storage_method ) = @_; >+ $storage_method ||= C4::Context->preference('SessionStorage'); > if ( $storage_method eq 'mysql' ) { > my $dbh = C4::Context->dbh; > return { dsn => "serializer:yamlxs;driver:MySQL;id:md5", dsn_args => { Handle => $dbh } }; >@@ -47,7 +47,8 @@ sub _get_session_params { > sub get_session { > my ( $class, $args ) = @_; > my $sessionID = $args->{sessionID}; >- my $params = $class->_get_session_params(); >+ my $storage_method = $args->{storage_method}; >+ my $params = $class->_get_session_params( { storage_method => $storage_method } ); > my $session; > if ($sessionID) { # find existing > CGI::Session::ErrorHandler->set_error(q{}); # clear error, cpan issue #111463 >-- >2.34.1
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 36098
:
162167
|
162200
|
162201
|
162204
|
162205
|
162228
|
162231
|
162314