[Koha-devel] Where should I put this?
Barton Chittenden
barton at bywatersolutions.com
Wed Jun 3 22:23:24 CEST 2015
I dunno, C4::Auth doesn't seem right to me, from the standpoint of
separation of concerns. I seems more natural to me in C4::Members.
On Wed, Jun 3, 2015 at 3:11 PM, Tomas Cohen Arazi <tomascohen at gmail.com>
wrote:
> I'd say it could belong to C4::Auth.
>
>
> 2015-06-03 13:07 GMT-03:00 Mark Tompsett <mtompset at hotmail.com>:
>
>> Greetings,
>>
>> One of the bugs I was working on needs a function which is duplicated in
>> a a couple places, so I was thinking it would be best to place it
>> somewhere. The question is where?
>>
>> sub getUserBranchAndCategorycode {
>> my $borrowernumber = 0;
>> my $homebranch = q{};
>> my $categorycode = q{};
>> if (C4::Context->userenv) {
>> $borrowernumber = C4::Context->userenv->{'number'} || 0;
>> $homebranch = C4::Context->userenv->{'branch'} || q{};
>> }
>> if ($borrowernumber) {
>> $categorycode =
>> C4::Members::GetBorrowerCategorycode($borrowernumber);
>> }
>> return { ‘branch’ => $homebranch, ‘categorycode’ => $categorycode };
>> }
>>
>> GPML,
>> Mark Tompsett
>>
>> _______________________________________________
>> Koha-devel mailing list
>> Koha-devel at lists.koha-community.org
>> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>> website : http://www.koha-community.org/
>> git : http://git.koha-community.org/
>> bugs : http://bugs.koha-community.org/
>>
>
>
>
> --
> Tomás Cohen Arazi
> Prosecretaría de Informática
> Universidad Nacional de Córdoba
> ✆ +54 351 5353750 ext 13168
> GPG: B76C 6E7C 2D80 551A C765 E225 0A27 2EA1 B2F3 C15F
> ×
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20150603/4ecb8f90/attachment.html>
More information about the Koha-devel
mailing list