Bugzilla – Attachment 62464 Details for
Bug 17964
TT syntax for notices - Prove that CHECKIN and CHECKOUT are compatible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17964: Replace next with last
Bug-17964-Replace-next-with-last.patch (text/plain), 1.87 KB, created by
Marcel de Rooy
on 2017-04-20 11:28:59 UTC
(
hide
)
Description:
Bug 17964: Replace next with last
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-04-20 11:28:59 UTC
Size:
1.87 KB
patch
obsolete
>From 5f5e87269329ce70a4a31c9914c88df761bae611 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 23 Mar 2017 22:13:17 -0300 >Subject: [PATCH] Bug 17964: Replace next with last >Content-Type: text/plain; charset=utf-8 > >We certainly always want to retrieve the last row of a given search. >If it not sufficient we will need to rethink this code. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Letters.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index f515fa0..5932a03 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -1589,9 +1589,9 @@ sub _get_tt_params { > foreach my $key ( @$fk ) { > $search->{$key} = $id->{$key}; > } >- $object = $module->search( $search )->next(); >+ $object = $module->search( $search )->last(); > } else { # Foreign key is single column >- $object = $module->search( { $fk => $id } )->next(); >+ $object = $module->search( { $fk => $id } )->last(); > } > } else { # using the table's primary key for lookup > $object = $module->find($id); >@@ -1601,7 +1601,7 @@ sub _get_tt_params { > else { # $ref eq 'ARRAY' > my $object; > if ( @{ $tables->{$table} } == 1 ) { # Param is a single key >- $object = $module->search( { $pk => $tables->{$table} } )->next(); >+ $object = $module->search( { $pk => $tables->{$table} } )->last(); > } > else { # Params are mutliple foreign keys > croak "Multiple foreign keys (table $table) should be passed using an hashref"; >-- >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 17964
:
59436
|
59437
|
59438
|
59540
|
59541
|
59542
|
60403
|
60404
|
60405
|
61595
|
61627
|
62460
|
62461
|
62462
|
62463
| 62464