Bugzilla – Attachment 95086 Details for
Bug 23414
Improve performance of C4/XSLT/buildKohaItemsNamespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23414: Use effective_itemtype
Bug-23414-Use-effectiveitemtype.patch (text/plain), 1.35 KB, created by
Jonathan Druart
on 2019-11-06 09:11:55 UTC
(
hide
)
Description:
Bug 23414: Use effective_itemtype
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-11-06 09:11:55 UTC
Size:
1.35 KB
patch
obsolete
>From 2de1433386cda07c8aa2186b2467a91fe48b4d14 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 4 Nov 2019 16:34:35 +0100 >Subject: [PATCH] Bug 23414: Use effective_itemtype > >We should use effective_itemtype instead of itype to take >the item-level_itypes pref into account. >Note that we should not need to test for the existence of the key as we >now assume that item types are correctly set to a valid item type. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/XSLT.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 9ed7dc3b54..173d4e0da7 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -334,7 +334,10 @@ sub buildKohaItemsNamespace { > elsif ($item->onloan) { > $status = "Checked out"; > } >- elsif ( $item->notforloan && $item->notforloan > 0 || $item->itype && $itemtypes->{ $item->itype }->{notforloan} && $itemtypes->{ $item->itype }->{notforloan} == 1 ) { >+ elsif ( $item->notforloan && $item->notforloan > 0 >+ || exists $itemtypes->{ $item->effective_itemtype } >+ && $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 ) >+ { > $status = "reference"; > } > elsif ( $item->notforloan < 0) { >-- >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 23414
:
91913
|
91914
|
91915
|
94537
|
94580
|
94581
|
95010
|
95011
|
95012
|
95014
|
95015
|
95069
|
95070
|
95071
|
95072
|
95073
|
95083
|
95084
|
95085
| 95086 |
95087
|
95088
|
95089