[Koha-devel] Where should I put this?
Tomas Cohen Arazi
tomascohen at gmail.com
Wed Jun 3 21:11:26 CEST 2015
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
×
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20150603/79ccaeb6/attachment.html>
More information about the Koha-devel
mailing list