Lines 65-93
use List::MoreUtils qw/uniq/;
Link Here
|
65 |
# |
65 |
# |
66 |
my $query = new CGI; |
66 |
my $query = new CGI; |
67 |
|
67 |
|
68 |
my $sessionID = $query->cookie("CGISESSID") ; |
|
|
69 |
my $session = get_session($sessionID); |
70 |
|
71 |
my $override_high_holds = $query->param('override_high_holds'); |
68 |
my $override_high_holds = $query->param('override_high_holds'); |
72 |
my $override_high_holds_tmp = $query->param('override_high_holds_tmp'); |
69 |
my $override_high_holds_tmp = $query->param('override_high_holds_tmp'); |
73 |
|
70 |
|
74 |
# branch and printer are now defined by the userenv |
71 |
my $sessionID = $query->cookie("CGISESSID") ; |
75 |
# but first we have to check if someone has tried to change them |
72 |
my $session = get_session($sessionID); |
76 |
|
73 |
if (!C4::Context->userenv){ |
77 |
my $branch = $query->param('branch'); |
|
|
78 |
if ($branch){ |
79 |
# update our session so the userenv is updated |
80 |
$session->param('branch', $branch); |
81 |
$session->param('branchname', GetBranchName($branch)); |
82 |
} |
83 |
|
84 |
my $printer = $query->param('printer'); |
85 |
if ($printer){ |
86 |
# update our session so the userenv is updated |
87 |
$session->param('branchprinter', $printer); |
88 |
} |
89 |
|
90 |
if (!C4::Context->userenv && !$branch){ |
91 |
if ($session->param('branch') eq 'NO_LIBRARY_SET'){ |
74 |
if ($session->param('branch') eq 'NO_LIBRARY_SET'){ |
92 |
# no branch set we can't issue |
75 |
# no branch set we can't issue |
93 |
print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl"); |
76 |
print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl"); |
Lines 162-169
for (@failedreturns) { $return_failed{$_} = 1; }
Link Here
|
162 |
my $findborrower = $query->param('findborrower') || q{}; |
145 |
my $findborrower = $query->param('findborrower') || q{}; |
163 |
$findborrower =~ s|,| |g; |
146 |
$findborrower =~ s|,| |g; |
164 |
|
147 |
|
165 |
$branch = C4::Context->userenv->{'branch'}; |
148 |
my $branch = C4::Context->userenv->{'branch'}; |
166 |
$printer = C4::Context->userenv->{'branchprinter'}; |
|
|
167 |
|
149 |
|
168 |
# If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian |
150 |
# If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian |
169 |
if (C4::Context->preference("AutoLocation") != 1) { |
151 |
if (C4::Context->preference("AutoLocation") != 1) { |
Lines 650-657
$template->param(
Link Here
|
650 |
categoryname => $borrower->{'description'}, |
632 |
categoryname => $borrower->{'description'}, |
651 |
branch => $branch, |
633 |
branch => $branch, |
652 |
branchname => GetBranchName($borrower->{'branchcode'}), |
634 |
branchname => GetBranchName($borrower->{'branchcode'}), |
653 |
printer => $printer, |
|
|
654 |
printername => $printer, |
655 |
was_renewed => scalar $query->param('was_renewed') ? 1 : 0, |
635 |
was_renewed => scalar $query->param('was_renewed') ? 1 : 0, |
656 |
expiry => $borrower->{'dateexpiry'}, |
636 |
expiry => $borrower->{'dateexpiry'}, |
657 |
roadtype => $roadtype, |
637 |
roadtype => $roadtype, |