Bugzilla – Attachment 61627 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.78 KB, created by
Jonathan Druart
on 2017-03-24 16:56:36 UTC
(
hide
)
Description:
Bug 17964: Replace next with last
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-03-24 16:56:36 UTC
Size:
1.78 KB
patch
obsolete
>From c5460b1239202726a600e526f7ddea94ede1de57 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 > >We certainly always want to retrieve the last row of a given search. >If it not sufficient we will need to rethink this code. >--- > C4/Letters.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index b8aab42..0a0760f 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -1575,9 +1575,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); >@@ -1587,7 +1587,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