From f37fc8b08c22cf7e4d8ac2512089800b4bc9e951 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 10 Jan 2014 13:07:10 -0500 Subject: [PATCH] Bug 11182: remove spurious logged warnings in circulation TEST PLAN --------- 1) Log into staff client 2) Click 'Circulation' 3) Click 'Check out' 4a) Type a patron name, click 'Submit' 4b) If necessary, select which one, and click 'Select' 5) Check the error logs, new warnings 6) Apply patch 7) Click 'Circulation' 8) Click 'Check out' 9a) Type a patron name, click 'Submit' 9b) If necessary, select which one, and click 'Select' 10) Check the error logs, no new warnings 11) Click the 'Restrictions' tab 12) Click 'Add manual restriction' 13) Add a dummy restriction 14) Click the 'Restrictions' tab 15) Click 'Remove' 16) Click 'OK' 17) Confirm that no additional error log entries were added and adding/deleting restrictions hasn't broken. Signed-off-by: Jesse Weaver Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi Signed-off-by: Galen Charlton --- circ/circulation.pl | 4 ++-- .../intranet-tmpl/prog/en/includes/borrower_debarments.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 216bfc368e..70f89d39d5 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -660,7 +660,7 @@ $amountold =~ s/^.*\$//; # remove upto the $, if any my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); -if ( $borrower->{'category_type'} eq 'C') { +if ( $borrowernumber && $borrower->{'category_type'} eq 'C') { my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); my $cnt = scalar(@$catcodes); $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; @@ -737,7 +737,7 @@ $template->param( relprevissues => \@relprevissues, displayrelissues => $displayrelissues, inprocess => $inprocess, - is_child => ($borrower->{'category_type'} eq 'C'), + is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), circview => 1, soundon => C4::Context->preference("SoundOn"), fast_cataloging => $fast_cataloging, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc index cea34161b4..8d6ac33886 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc @@ -22,7 +22,7 @@
- [% IF ( debarments.size < 1 ) %] + [% IF ( not debarments.defined || debarments.size < 1 ) %]

Patron is currently unrestricted.

[% ELSE %] -- 2.39.5