Bugzilla – Attachment 141971 Details for
Bug 31784
SingleBranchMode ignores public flag
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31784: (QA follow-up) Cleanup
Bug-31784-QA-follow-up-Cleanup.patch (text/plain), 1.27 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-10-17 13:16:28 UTC
(
hide
)
Description:
Bug 31784: (QA follow-up) Cleanup
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-10-17 13:16:28 UTC
Size:
1.27 KB
patch
obsolete
>From 9b97ff0429e2aa86038ba0770d1bb4be15f22309 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 17 Oct 2022 10:14:43 -0300 >Subject: [PATCH] Bug 31784: (QA follow-up) Cleanup > >This patch makes use of a ternary operator to simplify the code, and >removes references to renamed things. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Libraries.pm | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > >diff --git a/Koha/Libraries.pm b/Koha/Libraries.pm >index 933b477f847..7e22f84ec87 100644 >--- a/Koha/Libraries.pm >+++ b/Koha/Libraries.pm >@@ -66,20 +66,17 @@ sub search_filtered { > > =head3 single_library_mode > >- Aka singleBranchMode. >- > my $boolean = Koha::Libraries->single_library_mode; > >- Returns 1 if there is only one library marked public. >+Returns 1 if there is only one library marked public. > > =cut > >-sub single_library_mode { # formerly called singleBranchMode >+sub single_library_mode { > my $self = shift; >- if( $self->search({ public => 1 })->count == 1 ) { # Historically we test number==1 instead of number<2 >- return 1; >- } >- return 0; >+ >+ # Historically we test number==1 instead of number<2 >+ return $self->search({ public => 1 })->count == 1 ? 1 : 0; > } > > =head3 type >-- >2.34.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 31784
:
141855
|
141856
|
141857
|
141858
|
141870
|
141927
|
141928
|
141929
|
141969
|
141970
| 141971