my $input = new CGI;
-my $branch=C4::Context->preference('defaultbranch') || $input->param('branch');
-
-
-
my $dbh = C4::Context->dbh();
# Get the template to use
my ($template, $loggedinuser, $cookie)
debug => 1,
});
+my $branch= $input->param('branch') || C4::Context->userenv->{'branch'};
# Set all the branches.
my $onlymine=(C4::Context->preference('IndependantBranches') &&
C4::Context->userenv &&
C4::Context->userenv->{flags} !=1 &&
C4::Context->userenv->{branch}?1:0);
-if ( C4::Context->preference("IndependantBranches") ) {
+if ( $onlymine ) {
$branch = C4::Context->userenv->{'branch'};
}
my $branches = GetBranches($onlymine);