Bug 8435: (follow-up) make SearchSubscriptions handle lack of userenv
This patch allows t/db_dependent/Bookseller.t to pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
0838287630
commit
4f4946f8df
|
|
@ -711,8 +711,9 @@ sub SearchSubscriptions {
|
|||
for my $subscription ( @$results ) {
|
||||
$subscription->{cannotedit} = not can_edit_subscription( $subscription );
|
||||
$subscription->{cannotdisplay} =
|
||||
( C4::Context->preference("IndependentBranches")
|
||||
and $subscription->{branchcode} ne C4::Context->userenv->{'branch'} ) ? 1 : 0;
|
||||
( C4::Context->preference("IndependentBranches") &&
|
||||
C4::Context->userenv &&
|
||||
$subscription->{branchcode} ne C4::Context->userenv->{'branch'} ) ? 1 : 0;
|
||||
}
|
||||
|
||||
return @$results;
|
||||
|
|
|
|||
Loading…
Reference in New Issue