From fc9d9c6a3a08f0b9610563b01b2ffcd3e5b1d063 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 4 Apr 2018 02:06:52 +0000 Subject: [PATCH] Bug 19066: Follow up to reduce C4::Context references --- Koha/Account.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Koha/Account.pm b/Koha/Account.pm index e1f1327..c6fb8f5 100644 --- a/Koha/Account.pm +++ b/Koha/Account.pm @@ -76,9 +76,8 @@ sub pay { my $account_type = $params->{account_type}; my $offset_type = $params->{offset_type} || $type eq 'writeoff' ? 'Writeoff' : 'Payment'; - $library_id ||= C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; - my $userenv = C4::Context->userenv; + $library_id ||= $userenv ? $userenv->{'branch'} : undef; # We should remove accountno, it is no longer needed my $last = Koha::Account::Lines->search( -- 2.1.4