Bugzilla – Attachment 158588 Details for
Bug 35263
Cannot update patron categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35263: QA follow-up: Update code
Bug-35263-QA-follow-up-Update-code.patch (text/plain), 1.48 KB, created by
Pedro Amorim
on 2023-11-07 10:29:27 UTC
(
hide
)
Description:
Bug 35263: QA follow-up: Update code
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-11-07 10:29:27 UTC
Size:
1.48 KB
patch
obsolete
>From 00cba850a9b03d4ab5cdf2a230d4cdbc67cf126d Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 7 Nov 2023 10:25:18 +0000 >Subject: [PATCH] Bug 35263: QA follow-up: Update code > >Thank you Jonathan. I first tried with '||' but it would fallback to 1 >for either undef or 0 (we want the first case, but not the second). >But using '//' instead, it only falls back to 1 if undef, and not when 0. >Today I learned between '||' and '//'! Thanks! > >From perldoc.perl.org (relating to '//'): >'In fact, it's exactly the same as ||, except that it tests the left hand >side's definedness instead of its truth.' >--- > admin/categories.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/admin/categories.pl b/admin/categories.pl >index 1485e5b60f..8b436f7463 100755 >--- a/admin/categories.pl >+++ b/admin/categories.pl >@@ -72,7 +72,7 @@ elsif ( $op eq 'add_validate' ) { > my $category_type = $input->param('category_type'); > my $BlockExpiredPatronOpacActions = $input->param('BlockExpiredPatronOpacActions'); > my $checkPrevCheckout = $input->param('checkprevcheckout'); >- my $can_place_ill_in_opac = defined $input->param('can_place_ill_in_opac') ? $input->param('can_place_ill_in_opac') : 1; >+ my $can_place_ill_in_opac = $input->param('can_place_ill_in_opac') // 1; > my $default_privacy = $input->param('default_privacy'); > my $reset_password = $input->param('reset_password'); > my $change_password = $input->param('change_password'); >-- >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 35263
:
158495
|
158496
|
158543
|
158544
|
158566
|
158567
|
158588
|
158633
|
158634
|
158635