Bugzilla – Attachment 105999 Details for
Bug 25695
Missing logging of $@ in onboarding.pl after eval block
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25695: merge of similar code blocks after circulation_rules update
Bug-25695-merge-of-similar-code-blocks-after-circu.patch (text/plain), 2.24 KB, created by
Slava Shishkin
on 2020-06-18 10:21:21 UTC
(
hide
)
Description:
Bug 25695: merge of similar code blocks after circulation_rules update
Filename:
MIME Type:
Creator:
Slava Shishkin
Created:
2020-06-18 10:21:21 UTC
Size:
2.24 KB
patch
obsolete
>From 53a69128726a275f9f0ad58eaf12f4a31b9a99db Mon Sep 17 00:00:00 2001 >From: Slava Shishkin <slavashishkin@gmail.com> >Date: Thu, 18 Jun 2020 12:11:29 +0300 >Subject: [PATCH] Bug 25695: merge of similar code blocks after > circulation_rules update > >In onboarding.pl we have second block with adding just one more >rule parameter (maxissueqty) which can be merged to first one >after all parameters now stored in circulation_rules table. > >Also this eliminates the need of adding forgotten "warn $@" after >the second eval block. > >Mentored-by: Andrew Nugged <nugged@gmail.com> >--- > installer/onboarding.pl | 23 ++--------------------- > 1 file changed, 2 insertions(+), 21 deletions(-) > >diff --git a/installer/onboarding.pl b/installer/onboarding.pl >index 5d10d23c11..7a76342311 100755 >--- a/installer/onboarding.pl >+++ b/installer/onboarding.pl >@@ -272,7 +272,7 @@ if ( $step == 5 ) { > hardduedatecompare => -1, > holds_per_day => $holds_per_day, > holds_per_record => $holds_per_record, >- maxissueqty => "", >+ maxissueqty => $maxissueqty, > maxonsiteissueqty => "", > maxsuspensiondays => "", > no_auto_renewal_after => "", >@@ -294,26 +294,7 @@ if ( $step == 5 ) { > warn $@; > push @messages, { code => 'error_on_insert_circ_rule' }; > } else { >- >- eval { >- Koha::CirculationRules->set_rules( >- { >- categorycode => $categorycode, >- itemtype => $itemtype, >- branchcode => $branchcode, >- rules => { >- maxissueqty => $maxissueqty, >- } >- } >- ); >- }; >- >- unless ($@) { >- push @messages, { code => 'success_on_insert_circ_rule' }; >- } >- else { >- push @messages, { code => 'error_on_insert_circ_rule' }; >- } >+ push @messages, { code => 'success_on_insert_circ_rule' }; > } > } > >-- >2.17.1
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 25695
:
105650
|
105998
|
105999
|
106387