Bugzilla – Attachment 9060 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]
Bug 7937: Silence warns in OPAC error log (koha-opac-error_log)
Bug-7937-Silence-warns-in-OPAC-error-log-koha-opac.patch (text/plain), 2.25 KB, created by
Katrin Fischer
on 2012-04-09 22:42:26 UTC
(
hide
)
Description:
Bug 7937: Silence warns in OPAC error log (koha-opac-error_log)
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-04-09 22:42:26 UTC
Size:
2.25 KB
patch
obsolete
>From 5562eee7567a840b8c222ebfd9cbd0b21f75986d 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] 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} >--- > C4/XSLT.pm | 6 ++---- > 1 files changed, 2 insertions(+), 4 deletions(-) > >diff --git a/C4/XSLT.pm b/C4/XSLT.pm >index 56ba544..02922e9 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