Bugzilla – Attachment 91120 Details for
Bug 23225
OPAC ISBD view returns 404 when no item attached
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23225: Do not hide a biblio if there is no item
Bug-23225-Do-not-hide-a-biblio-if-there-is-no-item.patch (text/plain), 1012 bytes, created by
Tomás Cohen Arazi (tcohen)
on 2019-06-28 19:09:31 UTC
(
hide
)
Description:
Bug 23225: Do not hide a biblio if there is no item
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-06-28 19:09:31 UTC
Size:
1012 bytes
patch
obsolete
>From dc8f9266a54f7d18878df05a18e9e75d3d947919 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 28 Jun 2019 14:01:04 -0500 >Subject: [PATCH] Bug 23225: Do not hide a biblio if there is no item > >This patch fixes a 404 redirect from the OPAC ISBD view if the >bibliographic record does not have item attached. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Biblio.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index fae91cef33..f38a101e27 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -209,7 +209,11 @@ sub hidden_in_opac { > > my $rules = $params->{rules} // {}; > >- return !(any { !$_->hidden_in_opac({ rules => $rules }) } $self->items->as_list); >+ my @items = $self->items->as_list; >+ >+ return 0 unless @items; # Do not hide if there is no item >+ >+ return !(any { !$_->hidden_in_opac({ rules => $rules }) } @items); > } > > =head3 article_request_type >-- >2.22.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 23225
:
91047
|
91116
|
91117
|
91118
|
91119
| 91120