Bugzilla – Attachment 157165 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.59 KB, created by
Katrin Fischer
on 2023-10-14 18:57:24 UTC
(
hide
)
Description:
Bug 27249: Fix code style
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-10-14 18:57:24 UTC
Size:
3.59 KB
patch
obsolete
>From 9ba3e60dcb6ac87422b80ad5821223b729ea9eb1 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 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > 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 de416ff7a7..372c5596a9 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