Bugzilla – Attachment 88389 Details for
Bug 22749
Koha::Item->hidden_in_opac should consider hidelostitems syspref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems
Bug-22749-Make-KohaItem-hiddeninopac-respect-hidel.patch (text/plain), 1.10 KB, created by
Liz Rea
on 2019-04-22 16:02:42 UTC
(
hide
)
Description:
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2019-04-22 16:02:42 UTC
Size:
1.10 KB
patch
obsolete
>From 4ba2a4491ff739fdc8a7377447b74b14f8f686f9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 22 Apr 2019 12:02:02 -0300 >Subject: [PATCH] Bug 22749: Make Koha::Item->hidden_in_opac respect > hidelostitems > >This patch makes Koha::Item->hidden_in_opac take hidelostitems into >account when performing the calculation. > >To test: >- Apply the regression tests patch >- Run: > $ kshell > k$ prove t/db_dependent/Koha/Item.t >=> FAIL: Tests fail because the code doesn't (yet) care about the >syspref >- Apply this patch >- Run: > k$ prove t/db_dependent/Koha/Item.t >=> SUCCESS: Tests pass! >- Sign off :-D > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >--- > Koha/Item.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 66e0f9c73b..49ae8e16f3 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -214,6 +214,10 @@ sub hidden_in_opac { > > my $rules = $params->{rules} // {}; > >+ return 1 >+ if C4::Context->preference('hidelostitems') and >+ $self->itemlost > 0; >+ > my $hidden_in_opac = 0; > > foreach my $field ( keys %{$rules} ) { >-- >2.11.0
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 22749
:
88384
|
88385
|
88387
|
88388
|
88389
|
88404
|
88405