Bugzilla – Attachment 49145 Details for
Bug 8483
Borrower reading history should include deleted items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8483 - Speed improvements
Bug-8483---Speed-improvements.patch (text/plain), 2.83 KB, created by
Kyle M Hall (khall)
on 2016-03-14 18:20:24 UTC
(
hide
)
Description:
Bug 8483 - Speed improvements
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-03-14 18:20:24 UTC
Size:
2.83 KB
patch
obsolete
>From d61bca487ba6bb96461d0e0ad3e168d94fae9463 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 14 Mar 2016 18:16:36 +0000 >Subject: [PATCH] Bug 8483 - Speed improvements > >--- > Koha/Checkout.pm | 7 +++---- > Koha/Item.pm | 14 ++++++-------- > Koha/Patron.pm | 5 ++++- > 3 files changed, 13 insertions(+), 13 deletions(-) > >diff --git a/Koha/Checkout.pm b/Koha/Checkout.pm >index e96b6ad..936a234 100644 >--- a/Koha/Checkout.pm >+++ b/Koha/Checkout.pm >@@ -52,11 +52,10 @@ deleted item. > sub item { > my ( $self, $params ) = @_; > >- my $item = Koha::Items->search( { itemnumber => $self->itemnumber() } )->next(); >+ $self->{_item} ||= Koha::Item->_new_from_dbic( $self->_result()->item ); >+ $self->{_item} ||= Koha::Deleted::Items->find( { itemnumber => $self->itemnumber() } ) if ( $params->{deleted} ); > >- $item ||= Koha::Deleted::Items->search( { itemnumber => $self->itemnumber() } )->next() if ( $params->{deleted} ); >- >- return $item || undef; >+ return $self->{_item}; > } > > =head3 type >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 14f9853..f2e258f 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -126,11 +126,10 @@ deleted biblio. > sub biblio { > my ( $self, $params ) = @_; > >- my $biblio = Koha::Biblios->search( { biblionumber => $self->biblionumber() } )->next(); >+ $self->{_biblio} ||= Koha::Biblio->_new_from_dbic( $self->_result()->biblio ); >+ $self->{_biblio} ||= Koha::Deleted::Biblios->find( { biblionumber => $self->biblionumber() } ) if ( $params->{deleted} ); > >- $biblio ||= Koha::Deleted::Biblios->search( { biblionumber => $self->biblionumber() } )->next() if ( $params->{deleted} ); >- >- return $biblio || undef; >+ return $self->{_biblio}; > } > > =head3 biblioitem >@@ -148,11 +147,10 @@ deleted biblioitem. > sub biblioitem { > my ( $self, $params ) = @_; > >- my $biblioitem = Koha::BiblioItems->search( { biblionumber => $self->biblionumber() } )->next(); >- >- $biblioitem ||= Koha::Deleted::BiblioItems->search( { biblionumber => $self->biblionumber() } )->next() if ( $params->{deleted} ); >+ $self->{_biblioitem} ||= Koha::BiblioItem->_new_from_dbic( $self->_result()->biblioitem ); >+ $self->{_biblioitem} ||= Koha::Deleted::BiblioItems->find( { biblionumber => $self->biblionumber() } ) if ( $params->{deleted} ); > >- return $biblioitem || undef; >+ return $self->{_biblioitem}; > } > > =head3 type >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 4f52fc3..4e6eb76 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -114,7 +114,10 @@ sub all_checkouts { > borrowernumber => $self->borrowernumber(), > }, > { >- order_by => { "-$order_by_sort" => $order_by_column } >+ order_by => { "-$order_by_sort" => $order_by_column }, >+ prefetch => { >+ 'item' => 'biblio' >+ } > } > ); > >-- >2.1.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 8483
:
41013
|
41014
|
41015
|
41016
|
41017
|
41999
|
42000
|
42001
|
42787
|
42788
|
42789
|
42932
|
42935
|
42939
|
42940
|
42941
|
49129
|
49130
|
49131
|
49134
|
49135
|
49136
|
49137
|
49139
|
49140
|
49141
|
49142
|
49143
|
49144
| 49145