Bugzilla – Attachment 156786 Details for
Bug 27249
Using the calendar to 'close' a library can create an infinite loop during renewals
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27249: Fix code style
Bug-27249-Fix-code-style.patch (text/plain), 3.53 KB, created by
Julian Maurice
on 2023-10-10 11:07:31 UTC
(
hide
)
Description:
Bug 27249: Fix code style
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2023-10-10 11:07:31 UTC
Size:
3.53 KB
patch
obsolete
>From 81e751641325ca24de4dac97c07f78e1761ce2e3 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 10 Oct 2023 11:52:26 +0200 >Subject: [PATCH] Bug 27249: Fix code style > >--- > Koha/Exceptions/Calendar.pm | 2 +- > circ/circulation.pl | 64 +++++++++++++++++++------------------ > 2 files changed, 34 insertions(+), 32 deletions(-) > >diff --git a/Koha/Exceptions/Calendar.pm b/Koha/Exceptions/Calendar.pm >index 3891c3bced..cdb632a195 100644 >--- a/Koha/Exceptions/Calendar.pm >+++ b/Koha/Exceptions/Calendar.pm >@@ -9,7 +9,7 @@ use Exception::Class ( > isa => 'Koha::Exception', > }, > 'Koha::Exceptions::Calendar::NoOpenDays' => { >- isa => 'Koha::Exceptions::Calendar', >+ isa => 'Koha::Exceptions::Calendar', > description => 'Library has no open days', > }, > ); >diff --git a/circ/circulation.pl b/circ/circulation.pl >index c947fcd2ca..f96580fee7 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -290,36 +290,36 @@ if ($patron) { > # > # > if (@$barcodes) { >- my $checkout_infos; >- for my $barcode ( @$barcodes ) { >- >- my $template_params = { >- barcode => $barcode, >- onsite_checkout => $onsite_checkout, >- }; >- >- # always check for blockers on issuing >- my ( $error, $question, $alerts, $messages ); >- try { >- ( $error, $question, $alerts, $messages ) = CanBookBeIssued( >- $patron, >- $barcode, $datedue, >- $inprocess, >- undef, >- { >- onsite_checkout => $onsite_checkout, >- override_high_holds => $override_high_holds || $override_high_holds_tmp || 0, >- } >- ); >- } catch { >- die $_ unless blessed $_ && $_->can('rethrow'); >+ my $checkout_infos; >+ for my $barcode ( @$barcodes ) { >+ >+ my $template_params = { >+ barcode => $barcode, >+ onsite_checkout => $onsite_checkout, >+ }; >+ >+ # always check for blockers on issuing >+ my ( $error, $question, $alerts, $messages ); >+ try { >+ ( $error, $question, $alerts, $messages ) = CanBookBeIssued( >+ $patron, >+ $barcode, $datedue, >+ $inprocess, >+ undef, >+ { >+ onsite_checkout => $onsite_checkout, >+ override_high_holds => $override_high_holds || $override_high_holds_tmp || 0, >+ } >+ ); >+ } catch { >+ die $_ unless blessed $_ && $_->can('rethrow'); > >- if ($_->isa('Koha::Exceptions::Calendar::NoOpenDays')) { >- $error = { NO_OPEN_DAYS => 1 }; >- } else { >- $_->rethrow; >- } >- }; >+ if ( $_->isa('Koha::Exceptions::Calendar::NoOpenDays') ) { >+ $error = { NO_OPEN_DAYS => 1 }; >+ } else { >+ $_->rethrow; >+ } >+ }; > > my $blocker = $invalidduedate ? 1 : 0; > >@@ -365,8 +365,10 @@ if (@$barcodes) { > > # Only some errors will block when performing forced onsite checkout, > # for other cases all errors will block >- my @blocking_error_codes = ($onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce")) ? >- qw( UNKNOWN_BARCODE NO_OPEN_DAYS ) : (keys %$error); >+ my @blocking_error_codes = >+ ( $onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce") ) >+ ? qw( UNKNOWN_BARCODE NO_OPEN_DAYS ) >+ : ( keys %$error ); > > foreach my $code ( @blocking_error_codes ) { > if ($error->{$code}) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27249
:
153585
|
153682
|
154728
|
154920
|
154921
|
156786
|
156787
|
156788
|
157163
|
157164
|
157165
|
157166
|
157167