Bug 5902: additem.pl should default to set library
authorJared Camins-Esakov <jcamins@bywatersolutions.com>
Fri, 18 Mar 2011 00:48:33 +0000 (20:48 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 23 Mar 2011 08:33:07 +0000 (21:33 +1300)
This patch makes the additem screen default to selecting the currently set
library. If the library is unset, it will default to the first branch
alphabetically.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
cataloguing/additem.pl

index c5dd7d9..b2b1192 100755 (executable)
@@ -570,7 +570,7 @@ my $onlymine = C4::Context->preference('IndependantBranches') &&
                C4::Context->userenv                           && 
                C4::Context->userenv->{flags}!=1               && 
                C4::Context->userenv->{branch};
-my $branches = GetBranchesLoop(undef,$onlymine);  # build once ahead of time, instead of multiple times later.
+my $branches = GetBranchesLoop(C4::Context->userenv->{branch},$onlymine);  # build once ahead of time, instead of multiple times later.
 
 # We generate form, from actuel record
 my @fields;