<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>A new request with request id 17951 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is : <br><br>Title : Koha-devel Digest, Vol 187, Issue 1<br>Category : <br>Description : <div>Send Koha-devel mailing list submissions to<br>    koha-devel@lists.koha-community.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>    https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>or, via email, send a message with subject or body 'help' to<br>    koha-devel-request@lists.koha-community.org<br><br>You can reach the person managing the list at<br>    koha-devel-owner@lists.koha-community.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Koha-devel digest..."<br><br><br>Today's Topics:<br><br>   1. Question about Koha Session (Ivan Dziuba)<br>   2. Re: Question about Koha Session (Philippe Blouin)<br>   3. Re: Question about Koha Session (dcook@prosentient.com.au)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Tue, 01 Jun 2021 11:30:13 -0400<br>From: Ivan Dziuba <ivan.dziuba@inlibro.com><br>To: "koha-devel@lists.koha-community.org"<br>    <koha-devel@lists.koha-community.org><br>Subject: [Koha-devel] Question about Koha Session<br>Message-ID: <1499921622561342@mail.yandex.ru><br>Content-Type: text/plain; charset="utf-8"<br><br>An HTML attachment was scrubbed...<br>URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210601/f8a0d76d/attachment-0001.htm><br><br>------------------------------<br><br>Message: 2<br>Date: Tue, 1 Jun 2021 11:53:23 -0400<br>From: Philippe Blouin <philippe.blouin@inlibro.com><br>To: Ivan Dziuba <ivan.dziuba@inlibro.com>,<br>    "koha-devel@lists.koha-community.org"<br>    <koha-devel@lists.koha-community.org><br>Subject: Re: [Koha-devel] Question about Koha Session<br>Message-ID: <5709e0ad-b2c5-dc87-96c9-23781c98f126@inlibro.com><br>Content-Type: text/plain; charset="utf-8"; Format="flowed"<br><br>Hello Koha,<br><br>Actually, I'll extend Ivan's question a bit: is CGI::Session->load() the <br>way to go, or C4::Auth::get_session() would do the same thing ?<br><br>Thnaks<br><br>Philippe Blouin,<br>Directeur de la technologie<br><br>Tél.  : (833) 465-4276, poste 230<br>philippe.blouin@inLibro.com <mailto:philippe.blouin@inLibro.com><br><br>inLibro | pour esprit libre | www.inLibro.com <http://www.inLibro.com><br>On 2021-06-01 11:30 a.m., Ivan Dziuba wrote:<br>> Hello!<br>> I develop one patch of Koha for Autocomplete - <br>> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27113<br>> In this patch I use a session. I don't want to create every time new <br>> session and I have changed *CGI::Session->new()* <br>> from*CGI::Session->load().*<br>> But I don't sure in this condition *'CGI::Session->load() or die <br>> CGI::Session->errstr();'*<br>> Can I use (*DIE*) in this condition or not?<br>> Thanks!<br>><br>> _______________________________________________<br>> Koha-devel mailing list<br>> Koha-devel@lists.koha-community.org<br>> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>> website : https://www.koha-community.org/<br>> git : https://git.koha-community.org/<br>> bugs : https://bugs.koha-community.org/<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210601/7022c97a/attachment-0001.htm><br><br>------------------------------<br><br>Message: 3<br>Date: Wed, 2 Jun 2021 13:56:55 +1000<br>From: <dcook@prosentient.com.au><br>To: "'Philippe Blouin'" <philippe.blouin@inlibro.com>, "'Ivan Dziuba'"<br>    <ivan.dziuba@inlibro.com>, <koha-devel@lists.koha-community.org><br>Subject: Re: [Koha-devel] Question about Koha Session<br>Message-ID: <019501d75763$5467b320$fd371960$@prosentient.com.au><br>Content-Type: text/plain; charset="utf-8"<br><br>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.)<br><br> <br><br>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.<br><br> <br><br>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. <br><br> <br><br>I think Ivan might be on the wrong path here. Happy to discuss it further though. <br><br> <br><br>David Cook<br><br>Software Engineer<br><br>Prosentient Systems<br><br>Suite 7.03<br><br>6a Glen St<br><br>Milsons Point NSW 2061<br><br>Australia<br><br> <br><br>Office: 02 9212 0899<br><br>Online: 02 8005 0595<br><br> <br><br>From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Philippe Blouin<br>Sent: Wednesday, 2 June 2021 1:53 AM<br>To: Ivan Dziuba <ivan.dziuba@inlibro.com>; koha-devel@lists.koha-community.org<br>Subject: Re: [Koha-devel] Question about Koha Session<br><br> <br><br>Hello Koha,<br><br>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 ?<br><br>Thnaks<br><br>Philippe Blouin,<br>Directeur de la technologie<br><br>Tél.  : (833) 465-4276, poste 230<br> <mailto:philippe.blouin@inLibro.com> philippe.blouin@inLibro.com <br><br>inLibro | pour esprit libre |  <http://www.inLibro.com> www.inLibro.com <br><br>On 2021-06-01 11:30 a.m., Ivan Dziuba wrote:<br><br>Hello!<br><br> <br><br>I develop one patch of Koha for Autocomplete - https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27113<br><br>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().<br><br>But I don't sure in this condition 'CGI::Session->load() or die CGI::Session->errstr();'<br><br> <br><br>Can I use (DIE) in this condition or not?<br><br> <br><br>Thanks!<br><br><br><br><br><br>_______________________________________________<br>Koha-devel mailing list<br>Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> <br>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>website : https://www.koha-community.org/<br>git : https://git.koha-community.org/<br>bugs : https://bugs.koha-community.org/<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210602/65fdf864/attachment-0001.htm><br><br>------------------------------<br><br>Subject: Digest Footer<br><br>_______________________________________________<br>Koha-devel mailing list<br>Koha-devel@lists.koha-community.org<br>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>website : https://www.koha-community.org/<br>git : https://git.koha-community.org/<br>bugs : https://bugs.koha-community.org/<br><br><br>------------------------------<br><br>End of Koha-devel Digest, Vol 187, Issue 1<br>******************************************<br></div><br><br>NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.<br></body></html>