View | Details | Raw Unified | Return to bug 9457
Collapse All | Expand All

(-)a/members/memberentry.pl (-1 / +5 lines)
Lines 572-578 foreach (keys(%flags)) { Link Here
572
# in modify mod: userbranch value for GetBranchesLoop() comes from borrowers table
572
# in modify mod: userbranch value for GetBranchesLoop() comes from borrowers table
573
# in add    mod: userbranch value come from branches table (ip correspondence)
573
# in add    mod: userbranch value come from branches table (ip correspondence)
574
574
575
my $userbranch = C4::Context->userenv->{'branch'};
575
my $userbranch = '';
576
if (C4::Context->userenv && C4::Context->userenv->{'branch'}) {
577
    $userbranch = C4::Context->userenv->{'branch'};
578
}
579
576
if (defined ($data{'branchcode'}) and ( $op eq 'modify' || ( $op eq 'add' && $category_type eq 'C' ) )) {
580
if (defined ($data{'branchcode'}) and ( $op eq 'modify' || ( $op eq 'add' && $category_type eq 'C' ) )) {
577
    $userbranch = $data{'branchcode'};
581
    $userbranch = $data{'branchcode'};
578
}
582
}
(-)a/opac/opac-suggestions.pl (-1 / +5 lines)
Lines 128-134 if ( C4::Context->preference("AllowPurchaseSuggestionBranchChoice") ) { Link Here
128
    my ( $borr ) = GetMemberDetails( $borrowernumber );
128
    my ( $borr ) = GetMemberDetails( $borrowernumber );
129
129
130
# pass the pickup branch along....
130
# pass the pickup branch along....
131
    my $branch = $input->param('branch') || $borr->{'branchcode'} || C4::Context->userenv->{branch} || '' ;
131
    my $userbranch = '';
132
    if (C4::Context->userenv && C4::Context->userenv->{'branch'}) {
133
        $userbranch = C4::Context->userenv->{'branch'};
134
    }
135
    my $branch = $input->param('branch') || $borr->{'branchcode'} || $userbranch || '' ;
132
136
133
# make branch selection options...
137
# make branch selection options...
134
    my $branchloop = GetBranchesLoop($branch);
138
    my $branchloop = GetBranchesLoop($branch);
(-)a/reports/itemtypes.plugin (-4 / +7 lines)
Lines 31-40 use C4::Branch; # GetBranches Link Here
31
=cut
31
=cut
32
32
33
sub set_parameters {
33
sub set_parameters {
34
	my ($template) = @_;
34
    my ($template) = @_;
35
    my $userbranch = C4::Context->userenv->{'branch'};
35
    my $userbranch = '';
36
     $template->param( branchloop => GetBranchesLoop($userbranch) );
36
    if (C4::Context->userenv && C4::Context->userenv->{'branch'}) {
37
	return $template;
37
        $userbranch = C4::Context->userenv->{'branch'};
38
    }
39
    $template->param( branchloop => GetBranchesLoop($userbranch) );
40
    return $template;
38
}
41
}
39
42
40
sub calculate {
43
sub calculate {
(-)a/reserve/request.pl (-2 / +5 lines)
Lines 65-71 my $showallitems = $input->param('showallitems'); Link Here
65
my $branches = GetBranches();
65
my $branches = GetBranches();
66
my $itemtypes = GetItemTypes();
66
my $itemtypes = GetItemTypes();
67
67
68
my $userbranch = C4::Context->userenv->{branch};
68
my $userbranch = '';
69
if (C4::Context->userenv && C4::Context->userenv->{'branch'}) {
70
    $userbranch = C4::Context->userenv->{'branch'};
71
}
72
69
73
70
# Select borrowers infos
74
# Select borrowers infos
71
my $findborrower = $input->param('findborrower');
75
my $findborrower = $input->param('findborrower');
72
- 

Return to bug 9457