Bug 7364: Possible to get to FA item add without current branch being defined.
Some paths to the FA item-add screen didn't have a branch defined--if the param is set, use it, otherwise, use the user's logged in branch. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Modified for syntax by: Ian Walls <ian.walls@bywatersolutions.com> Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
This commit is contained in:
parent
977e1a401b
commit
4cf7cd28da
|
|
@ -665,10 +665,7 @@ my $onlymine = C4::Context->preference('IndependantBranches') &&
|
|||
C4::Context->userenv &&
|
||||
C4::Context->userenv->{flags}!=1 &&
|
||||
C4::Context->userenv->{branch};
|
||||
my $branch = C4::Context->userenv->{branch};
|
||||
if ($frameworkcode eq 'FA'){
|
||||
$branch = $input->param('branch');
|
||||
}
|
||||
my $branch = $input->param('branch') || C4::Context->userenv->{branch};
|
||||
my $branches = GetBranchesLoop($branch,$onlymine); # build once ahead of time, instead of multiple times later.
|
||||
|
||||
# We generate form, from actuel record
|
||||
|
|
|
|||
Loading…
Reference in New Issue