Bugzilla – Attachment 31550 Details for
Bug 12830
Move the order-related code into its own module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12830: use find instead of search
0005-Bug-12830-use-find-instead-of-search.patch (text/plain), 1.08 KB, created by
Paola Rossi
on 2014-09-12 09:45:47 UTC
(
hide
)
Description:
Bug 12830: use find instead of search
Filename:
MIME Type:
Creator:
Paola Rossi
Created:
2014-09-12 09:45:47 UTC
Size:
1.08 KB
patch
obsolete
>From 7830b8cc7dfa2a36962786e9fa5fa5c4ffe09899 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 27 Aug 2014 14:16:39 +0200 >Subject: [PATCH 5/5] Bug 12830: use find instead of search > >Since ordernumber is the pk, it is stupid to use search. > >Signed-off-by: Paola Rossi <paola.rossi@cineca.it> >--- > Koha/Acquisition/Order.pm | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/Koha/Acquisition/Order.pm b/Koha/Acquisition/Order.pm >index d6cfa8e..67a9982 100644 >--- a/Koha/Acquisition/Order.pm >+++ b/Koha/Acquisition/Order.pm >@@ -17,11 +17,10 @@ sub fetch { > return unless $ordernumber; > my $schema = Koha::Database->new->schema; > >- my $rs = >- $schema->resultset('Aqorder')->search( { ordernumber => $ordernumber }, >+ my $order = >+ $schema->resultset('Aqorder')->find( { ordernumber => $ordernumber }, > { result_class => 'DBIx::Class::ResultClass::HashRefInflator' } ); >- >- return $class->new( $rs->first ); >+ return $class->new( $order ); > } > > sub insert { >-- >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 12830
:
31178
|
31180
|
31237
|
31498
|
31499
|
31521
|
31522
|
31549
|
31550
|
31714
|
31715
|
31827
|
31828
|
32810
|
32811