[Koha-bugs] [Bug 17872] Fix small error in GetBudgetHierarchy and one of its calls

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jan 23 08:53:59 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17872

--- Comment #3 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to M. Tompsett from comment #2)
> Comment on attachment 58723 [details] [review]
> Bug 17872: Fix small error in GetBudgetHierarchy and one of its calls
> 
> Review of attachment 58723 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: admin/aqbudgets.pl
> @@ +237,4 @@
> >      );
> >  
> >      my @budgets = @{
> > +        GetBudgetHierarchy( $$period{budget_period_id}, C4::Context->userenv->{branch}, ( $show_mine ? $borrower_id : 0 ))
> 
> Really don't like C4::Context->userenv->{branch}!
> Can this code be triggered by a test which isn't "logged in"?

Corrects the even worse userenv->{branchcode}.
This code cannot be reached when you are not logged in.

Would you feel better with:
my $userenv = C4::Context->userenv;
my $branch = $userenv ? $userenv->{branch} : undef;

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list