<div dir="ltr"><div>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.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 3, 2015 at 3:11 PM, Tomas Cohen Arazi <span dir="ltr"><<a href="mailto:tomascohen@gmail.com" target="_blank">tomascohen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'd say it could belong to C4::Auth.<div><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2015-06-03 13:07 GMT-03:00 Mark Tompsett <span dir="ltr"><<a href="mailto:mtompset@hotmail.com" target="_blank">mtompset@hotmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr">
<div dir="ltr">
<div style="FONT-SIZE:12pt;FONT-FAMILY:'Calibri';COLOR:#000000">
<div>Greetings,</div>
<div> </div>
<div>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?</div>
<div> </div>
<div>sub getUserBranchAndCategorycode {</div>
<div>    my $borrowernumber = 0;</div>
<div>    my $homebranch = q{};</div>
<div>    my $categorycode = q{};</div>
<div>    if (C4::Context->userenv) {</div>
<div>        $borrowernumber = 
C4::Context->userenv->{'number'} || 0;</div>
<div>        $homebranch = 
C4::Context->userenv->{'branch'} || q{};</div>
<div>    }</div>
<div>    if ($borrowernumber) {</div>
<div>        $categorycode = 
C4::Members::GetBorrowerCategorycode($borrowernumber);</div>
<div>    }</div>
<div>    return { ‘branch’ => $homebranch, ‘categorycode’ 
=> $categorycode };</div>
<div>}</div>
<div> </div>
<div>GPML,</div>
<div>Mark Tompsett</div></div></div></div>
<br></div></div>_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Tomás Cohen Arazi</div><div>Prosecretaría de Informática</div><div>Universidad Nacional de Córdoba</div><div>✆ <a href="tel:%2B54%20351%205353750%20ext%2013168" value="+543515353750" target="_blank">+54 351 5353750 ext 13168</a></div><div>GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F</div></div></div>
</font></span></div><span class="HOEnZb"><font color="#888888"><a>×</a>            <button type="button"><i></i></button>             <button type="button"><i></i></button>             <button type="button"><i></i></button>             <button type="button" style="display:inline-block"><i></i></button>             </font></span></div></div>
<br>_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br></blockquote></div><br></div>