From 0419aed02d1c0bb45bca6842d01a709adce9b820 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 3 May 2016 10:36:15 +0000 Subject: [PATCH] Bug 16429 - Fix root problem MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The root of this issue is old code in circulation.pl that is no longer needed and leaves the affected scripts open to future regressions. Signed-off-by: Marc Véron Signed-off-by: Heather Braum Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 640b9585f82ff898bebcebd01efab81bca311588) Signed-off-by: Julian Maurice --- circ/circulation.pl | 24 ++----------------- .../prog/en/includes/patron-search-box.inc | 5 ---- .../prog/en/modules/circ/circulation.tt | 2 -- members/routing-lists.pl | 17 ++----------- 4 files changed, 4 insertions(+), 44 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 56ed41a0c9..7658670d4e 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -62,24 +62,7 @@ my $query = new CGI; my $sessionID = $query->cookie("CGISESSID") ; my $session = get_session($sessionID); - -# branch and printer are now defined by the userenv -# but first we have to check if someone has tried to change them - -my $branch = $query->param('branch'); -if ($branch){ - # update our session so the userenv is updated - $session->param('branch', $branch); - $session->param('branchname', GetBranchName($branch)); -} - -my $printer = $query->param('printer'); -if ($printer){ - # update our session so the userenv is updated - $session->param('branchprinter', $printer); -} - -if (!C4::Context->userenv && !$branch){ +if (!C4::Context->userenv){ if ($session->param('branch') eq 'NO_LIBRARY_SET'){ # no branch set we can't issue print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl"); @@ -154,8 +137,7 @@ for (@failedreturns) { $return_failed{$_} = 1; } my $findborrower = $query->param('findborrower') || q{}; $findborrower =~ s|,| |g; -$branch = C4::Context->userenv->{'branch'}; -$printer = C4::Context->userenv->{'branchprinter'}; +my $branch = C4::Context->userenv->{'branch'}; # If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian if (C4::Context->preference("AutoLocation") != 1) { @@ -594,8 +576,6 @@ $template->param( categoryname => $borrower->{'description'}, branch => $branch, branchname => GetBranchName($borrower->{'branchcode'}), - printer => $printer, - printername => $printer, was_renewed => $query->param('was_renewed') ? 1 : 0, expiry => $borrower->{'dateexpiry'}, roadtype => $roadtype, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc index 82fd9e0d36..9e9227e199 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc @@ -1,4 +1,3 @@ -[% USE Branches %] [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %][% IF ( CircAutocompl ) %]