Bugzilla – Attachment 55982 Details for
Bug 17317
Adding "bib" type to GetAvailability method for ILSDI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF]Bug 17317: Perfomance Improvement
SIGNED-OFFBug-17317-Perfomance-Improvement.patch (text/plain), 2.69 KB, created by
Héctor Eduardo Castro Avalos
on 2016-10-03 16:16:34 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 17317: Perfomance Improvement
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-10-03 16:16:34 UTC
Size:
2.69 KB
patch
obsolete
>From 9cff5392d2e8f17b031c2f694c356114262b3fb3 Mon Sep 17 00:00:00 2001 >From: Lyon3 Team <koha@univ-lyon3.fr> >Date: Fri, 30 Sep 2016 14:50:16 +0200 >Subject: [PATCH] [SIGNED-OFF]Bug 17317: Perfomance Improvement > >- Use of GetItemnumbersForBiblio instead of GetItemsByBiblioitemnumber (thx Jonathan Druart) > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised >--- > C4/ILSDI/Services.pm | 23 ++++++++++------------- > 1 file changed, 10 insertions(+), 13 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 279eec2..f0d9071 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -134,19 +134,15 @@ sub GetAvailability { > } else { > my $status; > my $msg; >- my $biblioitem = ( GetBiblioItemByBiblioNumber( $id, undef ) )[0]; >- if ($biblioitem) { >- my $biblioitemnumber = $biblioitem->{'biblioitemnumber'}; >- my $items = (GetItemsByBiblioitemnumber($biblioitemnumber))[0]; >- >+ my $items = GetItemnumbersForBiblio($id); >+ if ($items) { >+ # Open XML >+ $out .= " <dlf:record>\n"; >+ $out .= " <dlf:bibliographic id=\"" .$id. "\" />\n"; >+ $out .= " <dlf:items>\n"; > # We loop over the items to clean them >- my $itemnumber; >- foreach my $item (@$items) { >- $itemnumber=$item->{'itemnumber'}; >+ foreach my $itemnumber (@$items) { > my ( $biblionumber, $status, $msg, $location ) = _availability($itemnumber); >- $out .= " <dlf:record>\n"; >- $out .= " <dlf:bibliographic id=\"" . ( $biblionumber || $itemnumber ) . "\" />\n"; >- $out .= " <dlf:items>\n"; > $out .= " <dlf:item id=\"" . $itemnumber . "\">\n"; > $out .= " <dlf:simpleavailability>\n"; > $out .= " <dlf:identifier>" . $itemnumber . "</dlf:identifier>\n"; >@@ -155,9 +151,10 @@ sub GetAvailability { > if ($location) { $out .= " <dlf:location>" . $location . "</dlf:location>\n"; } > $out .= " </dlf:simpleavailability>\n"; > $out .= " </dlf:item>\n"; >- $out .= " </dlf:items>\n"; >- $out .= " </dlf:record>\n"; > } >+ # Close XML >+ $out .= " </dlf:items>\n"; >+ $out .= " </dlf:record>\n"; > } else { > $status = "unknown"; > $msg = "Error: could not retrieve availability for this ID"; >-- >1.7.10.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 17317
:
55685
|
55714
|
55775
|
55956
|
55970
|
55971
|
55981
|
55982
|
58180
|
58287
|
58288
|
58469