Bugzilla – Attachment 9134 Details for
Bug 7937
Silence warns in OPAC error log (koha-opac-error_log)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 7937: Silence warns in OPAC error log (koha-opac-error_log)
SIGNED-OFF-Bug-7937-Silence-warns-in-OPAC-error-lo.patch (text/plain), 2.32 KB, created by
Chris Cormack
on 2012-04-12 09:14:38 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 7937: Silence warns in OPAC error log (koha-opac-error_log)
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-04-12 09:14:38 UTC
Size:
2.32 KB
patch
obsolete
>From 91f5032a8555d954cac08d9d52bc3e57100fb67b Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Tue, 10 Apr 2012 00:29:59 +0200 >Subject: [PATCH] [SIGNED OFF] Bug 7937: Silence warns in OPAC error log > (koha-opac-error_log) > >I noticed warnings in the logs for an item without itemtype on item >and record level. While trying to resolve the warns, I noticed a possible >optimization in XSLT.pm. > >GetItemsInfo is built to return the notforloan value both for the item >and record level, depending on the item-level_itype setting. > >- $item->{notforloan} doesn't exist in @items >- $itemtypes->{ $item->{itype} }->{notforloan} can be replaced by $item->{notforloan_per_itemtype} > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/XSLT.pm | 6 ++---- > 1 files changed, 2 insertions(+), 4 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 56ba544..78aa54a 100644 >--- a/C4/XSLT.pm >+++ b/C4/XSLT.pm >@@ -232,7 +232,6 @@ sub buildKohaItemsNamespace { > @items = grep { !$hi{$_->{itemnumber}} } @items; > } > my $branches = GetBranches(); >- my $itemtypes = GetItemTypes(); > my $xml = ''; > for my $item (@items) { > my $status; >@@ -240,13 +239,12 @@ sub buildKohaItemsNamespace { > my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber}); > > my ( $reservestatus, $reserveitem, undef ) = C4::Reserves::CheckReserves($item->{itemnumber}); >- >- if ( $itemtypes->{ $item->{itype} }->{notforloan} || $item->{notforloan} || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} || >+ if ( $item->{notforloan_per_itemtype} || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} || > (defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} || (defined $reservestatus && $reservestatus eq "Waiting") ){ > if ( $item->{notforloan} < 0) { > $status = "On order"; > } >- if ( $item->{itemnotforloan} > 0 || $item->{notforloan} > 0 || $itemtypes->{ $item->{itype} }->{notforloan} == 1 ) { >+ if ( $item->{itemnotforloan} > 0 || ($item->{notforloan_per_itemtype} && $item->{notforloan_per_itemtype}) == 1 ) { > $status = "reference"; > } > if ($item->{onloan}) { >-- >1.7.5.4
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 7937
:
9059
|
9060
|
9061
|
9063
|
9064
|
9065
|
9115
| 9134 |
9135
|
9141
|
9142
|
9143