[Bug 8311] New: Mis-scoped function call in C4::Auth
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 Priority: P5 - low Change sponsored?: --- Bug ID: 8311 Assignee: jcamins@cpbibliography.com Summary: Mis-scoped function call in C4::Auth Severity: normal Classification: Unclassified OS: All Reporter: jcamins@cpbibliography.com Hardware: All Status: NEW Version: master Component: Architecture, internals, and plumbing Product: Koha There is a mis-scoped function call in C4::Auth, on line 154, where GetMembers is called without explicit scoping and before 'require C4::Members;'. This does not actually have any functional ramifications as far as I can tell, but it would be a good idea to fix it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 10481 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10481&action=edit Bug 8311: Fix scoping error in C4::Auth There is a mis-scoped function call in C4::Auth, on line 154, where GetMembers is called without explicit scoping and before 'require C4::Members;'. This does not actually have any functional ramifications as far as I can tell, but it would be a good idea to fix it. This patch also corrects a bit of indenting in that area, because it was an unnecessary challenge to understand the code with the mis-indenting. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #10481|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 10532 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10532&action=edit [SIGNED-OFF] Bug 8311: Fix scoping error in C4::Auth There is a mis-scoped function call in C4::Auth, on line 154, where GetMembers is called without explicit scoping and before 'require C4::Members;'. This does not actually have any functional ramifications as far as I can tell, but it would be a good idea to fix it. This patch also corrects a bit of indenting in that area, because it was an unnecessary challenge to understand the code with the mis-indenting. Signed-off-by: Marc Veron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart@biblibre.co | |m --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- I don't know how we can reproduce the error. But the patch fixes a mis-scoped function. Marking as Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: Why did you put the line require C4::Members; outside from if (!defined($borrowernumber) && defined($user)) { ? The way you made it, C4::Members will be loaded on everypage, that will impact performances ! Written: if (!defined($borrowernumber) && defined($user)) { require C4::Members; my $borrower = C4::Members::GetMember(borrowernumber => $user); will load the C4::Members only if the getborrowernumber does not return the user (which should never happen) waiting for your feedback, not pushing not marking failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 --- Comment #5 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- (In reply to comment #4)
QA comment:
Why did you put the line require C4::Members; outside from if (!defined($borrowernumber) && defined($user)) { ?
The way you made it, C4::Members will be loaded on everypage, that will impact performances !
C4::Members was always loaded whenever $user was set. I just moved the require up so that it was before *both* calls to routines in C4::Members (if you scroll down about a page, you'll see a call to GetMemberDetails.
Written: if (!defined($borrowernumber) && defined($user)) { require C4::Members; my $borrower = C4::Members::GetMember(borrowernumber => $user); will load the C4::Members only if the getborrowernumber does not return the user (which should never happen)
waiting for your feedback, not pushing not marking failed QA
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version|master |rel_3_8 --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> --- OK, got it. Patch pushed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.8.x, will be in 3.8.3 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org