Revert "Bug 7364: Possible to get to FA item add without current branch being defined."
authorPaul Poulain <paul.poulain@biblibre.com>
Mon, 16 Jan 2012 17:58:10 +0000 (18:58 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 16 Jan 2012 17:58:10 +0000 (18:58 +0100)
This reverts commit 6f681bec2d71d3d2b88aea5f8e0c15010241d580.

Reverting because on my test server, I get

syntax error at /home/paul/koha.dev/koha-community/cataloguing/additem.pl line
668, near "->param{"
Execution of /home/paul/koha.dev/koha-community/cataloguing/additem.pl aborted
due to compilation errors.

cataloguing/additem.pl

index 9ec9a38..a734d0f 100755 (executable)
@@ -665,7 +665,10 @@ my $onlymine = C4::Context->preference('IndependantBranches') &&
                C4::Context->userenv                           && 
                C4::Context->userenv->{flags}!=1               && 
                C4::Context->userenv->{branch};
-my $branch = $input->param{'branch'} || C4::Context->userenv->{branch};
+my $branch = C4::Context->userenv->{branch};
+if ($frameworkcode eq 'FA'){
+    $branch = $input->param('branch');
+}    
 my $branches = GetBranchesLoop($branch,$onlymine);  # build once ahead of time, instead of multiple times later.
 
 # We generate form, from actuel record