Bugzilla – Attachment 31828 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
Bug-12830-use-find-instead-of-search.patch (text/plain), 1.04 KB, created by
Jonathan Druart
on 2014-09-23 09:51:38 UTC
(
hide
)
Description:
Bug 12830: use find instead of search
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-09-23 09:51:38 UTC
Size:
1.04 KB
patch
obsolete
>From 38a2e9e3edd613cbea42da8ac8838b9142014e19 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] 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 { >-- >2.1.0
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