<div dir="ltr">I'd say it could belong to C4::Auth.<div><br><div class="gmail_extra"><br><div class="gmail_quote">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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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>_______________________________________________<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><br></blockquote></div><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>✆ +54 351 5353750 ext 13168</div><div>GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F</div></div></div>
</div><a class="m-frame-close">×</a>            <button id="signBtn" class="m-btn m-encrypt-button" type="button" style><i class="m-icon m-icon-sign"></i></button>             <button id="encryptBtn" class="m-btn m-encrypt-button" type="button" style><i class="m-icon m-icon-encrypt"></i></button>             <button id="undoBtn" class="m-btn m-encrypt-button" type="button" style><i class="m-icon m-icon-undo"></i></button>             <button id="editorBtn" class="m-btn m-encrypt-button" type="button" style="display:inline-block"><i class="m-icon m-icon-editor"></i></button>             </div></div>