A new request with request id 17951 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is :
Title : Koha-devel Digest, Vol 187, Issue 1
Category :
Description : Send Koha-devel mailing list submissions to
koha-devel@lists.koha-community.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
or, via email, send a message with subject or body 'help' to
koha-devel-request@lists.koha-community.org
You can reach the person managing the list at
koha-devel-owner@lists.koha-community.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Koha-devel digest..."
Today's Topics:
1. Question about Koha Session (Ivan Dziuba)
2. Re: Question about Koha Session (Philippe Blouin)
3. Re: Question about Koha Session (dcook@prosentient.com.au)
----------------------------------------------------------------------
Message: 1
Date: Tue, 01 Jun 2021 11:30:13 -0400
From: Ivan Dziuba <ivan.dziuba@inlibro.com>
To: "koha-devel@lists.koha-community.org"
<koha-devel@lists.koha-community.org>
Subject: [Koha-devel] Question about Koha Session
Message-ID: <1499921622561342@mail.yandex.ru>
Content-Type: text/plain; charset="utf-8"
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210601/f8a0d76d/attachment-0001.htm>
------------------------------
Message: 2
Date: Tue, 1 Jun 2021 11:53:23 -0400
From: Philippe Blouin <philippe.blouin@inlibro.com>
To: Ivan Dziuba <ivan.dziuba@inlibro.com>,
"koha-devel@lists.koha-community.org"
<koha-devel@lists.koha-community.org>
Subject: Re: [Koha-devel] Question about Koha Session
Message-ID: <5709e0ad-b2c5-dc87-96c9-23781c98f126@inlibro.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Hello Koha,
Actually, I'll extend Ivan's question a bit: is CGI::Session->load() the
way to go, or C4::Auth::get_session() would do the same thing ?
Thnaks
Philippe Blouin,
Directeur de la technologie
Tél. : (833) 465-4276, poste 230
philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com>
inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com>
On 2021-06-01 11:30 a.m., Ivan Dziuba wrote:
> Hello!
> I develop one patch of Koha for Autocomplete -
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27113
> In this patch I use a session. I don't want to create every time new
> session and I have changed *CGI::Session->new()*
> from*CGI::Session->load().*
> But I don't sure in this condition *'CGI::Session->load() or die
> CGI::Session->errstr();'*
> Can I use (*DIE*) in this condition or not?
> Thanks!
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel@lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : https://www.koha-community.org/
> git : https://git.koha-community.org/
> bugs : https://bugs.koha-community.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210601/7022c97a/attachment-0001.htm>
------------------------------
Message: 3
Date: Wed, 2 Jun 2021 13:56:55 +1000
From: <dcook@prosentient.com.au>
To: "'Philippe Blouin'" <philippe.blouin@inlibro.com>, "'Ivan Dziuba'"
<ivan.dziuba@inlibro.com>, <koha-devel@lists.koha-community.org>
Subject: Re: [Koha-devel] Question about Koha Session
Message-ID: <019501d75763$5467b320$fd371960$@prosentient.com.au>
Content-Type: text/plain; charset="utf-8"
Glancing at https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27113, I don’t know why a person would need to use a session object. Happy for that to be explained. (Technically, it doesn’t look like it’s actually doing anything useful with CGI::Session, since it looks like it’s just throwing data into a file-backed session, and not even using it.)
As for sessions more generally, Koha does not handle sessions very well. It’s a goal of mine to create a Koha::Session class at some point, but there are only so many hours in the day.
When I work with sessions, I use C4::Auth::get_session($sessionID) where $sessionID is the value of the CGISESSID cookie. You will always have a CGISESSID *except* when you land on Koha for the very first time. But then when you’re on the landing page, you have access to the new session object directly anyway.
I think Ivan might be on the wrong path here. Happy to discuss it further though.
David Cook
Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia
Office: 02 9212 0899
Online: 02 8005 0595
From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Philippe Blouin
Sent: Wednesday, 2 June 2021 1:53 AM
To: Ivan Dziuba <ivan.dziuba@inlibro.com>; koha-devel@lists.koha-community.org
Subject: Re: [Koha-devel] Question about Koha Session
Hello Koha,
Actually, I'll extend Ivan's question a bit: is CGI::Session->load() the way to go, or C4::Auth::get_session() would do the same thing ?
Thnaks
Philippe Blouin,
Directeur de la technologie
Tél. : (833) 465-4276, poste 230
<mailto:philippe.blouin@inLibro.com> philippe.blouin@inLibro.com
inLibro | pour esprit libre | <http://www.inLibro.com> www.inLibro.com
On 2021-06-01 11:30 a.m., Ivan Dziuba wrote:
Hello!
I develop one patch of Koha for Autocomplete - https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27113
In this patch I use a session. I don't want to create every time new session and I have changed CGI::Session->new() from CGI::Session->load().
But I don't sure in this condition 'CGI::Session->load() or die CGI::Session->errstr();'
Can I use (DIE) in this condition or not?
Thanks!
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org>
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210602/65fdf864/attachment-0001.htm>
------------------------------
Subject: Digest Footer
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/
------------------------------
End of Koha-devel Digest, Vol 187, Issue 1
******************************************
NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.