Bugzilla – Attachment 162205 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.45 KB, created by
Jonathan Druart
on 2024-02-15 13:08:19 UTC
(
hide
)
Description:
Bug 36098: Allow to pass storage_method
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-02-15 13:08:19 UTC
Size:
1.45 KB
patch
obsolete
>From 1da3dccfa5352443b7e2b17f509e887f01cf8fea 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 | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/Koha/Session.pm b/Koha/Session.pm >index 8f74ee10cad..54290d3df36 100644 >--- a/Koha/Session.pm >+++ b/Koha/Session.pm >@@ -51,8 +51,8 @@ will be created. > =cut > > 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 } }; >@@ -75,8 +75,9 @@ sub _get_session_params { > > sub get_session { > my ( $class, $args ) = @_; >- my $sessionID = $args->{sessionID}; >- my $params = $class->_get_session_params(); >+ my $sessionID = $args->{sessionID}; >+ 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