From b13ed64ff9fa997cd5033723c9665556405b7f25 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 21 Jan 2014 09:43:19 -0500 Subject: [PATCH] Bug 11590 - Librarian able to checkout item without setting branch first It is possible to begin circulating items to a patron without first setting your logged in branch! Test Plan: 1) From the "Search patrons" quick search, search for any patron 2) From this patron's details screen, click the "Check out" quick search and put in a valid patron cardnumber 3) You are now able to issue items to this patron without having set your logged in branch. 4) Apply this patch 5) Repeat steps 1-2, you should now be redirected to select a branch instead of being taken directly to circulation.pl --- circ/circulation.pl | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 9769731..48d68bb 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -76,12 +76,10 @@ if ($printer){ $session->param('branchprinter', $printer); } -if (!C4::Context->userenv && !$branch){ - if ($session->param('branch') eq 'NO_LIBRARY_SET'){ - # no branch set we can't issue - print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl"); - exit; - } +if ( $session->param('branch') eq 'NO_LIBRARY_SET' ) { + # no branch set we can't issue + print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl"); + exit; } my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( -- 1.7.2.5