[Koha-bugs] [Bug 8311] Mis-scoped function call in C4::Auth

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 29 12:06:48 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8311

--- Comment #5 from Jared Camins-Esakov <jcamins at 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.


More information about the Koha-bugs mailing list