Bugzilla – Attachment 113584 Details for
Bug 22818
ILL should be able to send notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22818: Fix the last_insert_id call
Bug-22818-Fix-the-lastinsertid-call.patch (text/plain), 3.34 KB, created by
Jonathan Druart
on 2020-11-13 08:17:46 UTC
(
hide
)
Description:
Bug 22818: Fix the last_insert_id call
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-13 08:17:46 UTC
Size:
3.34 KB
patch
obsolete
>From dcc1b96ea9cba850b1d5cfb84a171685b1b2a5ad Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 13 Nov 2020 08:14:40 +0100 >Subject: [PATCH] Bug 22818: Fix the last_insert_id call > >DBI last_insert_id: invalid number of arguments: got handle + 3, expected handle + between 4 and 5 >Usage: $h->last_insert_id($catalog, $schema, $table_name, $field_name [, \%attr ]) at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 23326. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > installer/data/mysql/updatedatabase.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 61d806f442..b524fad3a6 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -23323,14 +23323,14 @@ if( CheckVersion( $DBversion ) ) { > $dbh->do( q| INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default'); | ); > # Add patron messaging preferences > $dbh->do( q| INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_ready', 0); | ); >- my $ready_id = $dbh->last_insert_id(undef, undef, 'message_attributes'); >+ my $ready_id = $dbh->last_insert_id(undef, undef, 'message_attributes', undef); > if (defined $ready_id) { > $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'email', 0, 'ill', 'ILL_PICKUP_READY');) ); > $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'sms', 0, 'ill', 'ILL_PICKUP_READY');) ); > $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'phone', 0, 'ill', 'ILL_PICKUP_READY');) ); > } > $dbh->do( q| INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_unavailable', 0); | ); >- my $unavail_id = $dbh->last_insert_id(undef, undef, 'message_attributes'); >+ my $unavail_id = $dbh->last_insert_id(undef, undef, 'message_attributes', undef); > if (defined $unavail_id) { > $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($unavail_id, 'email', 0, 'ill', 'ILL_REQUEST_UNAVAIL');) ); > $dbh->do( qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($unavail_id, 'sms', 0, 'ill', 'ILL_REQUEST_UNAVAIL');) ); >-- >2.20.1
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 22818
:
89831
|
89832
|
89833
|
89834
|
89835
|
90063
|
90064
|
90065
|
90066
|
90067
|
90715
|
90716
|
90717
|
90718
|
90719
|
92898
|
92899
|
92900
|
92901
|
92902
|
100234
|
100235
|
100236
|
100237
|
100238
|
103268
|
103269
|
103270
|
103271
|
103272
|
106424
|
106425
|
106426
|
106427
|
106428
|
106675
|
106676
|
106677
|
106678
|
106679
|
106680
|
106681
|
106691
|
106693
|
106694
|
106704
|
106705
|
106706
|
106707
|
106708
|
106709
|
106710
|
106711
|
106712
|
106713
|
110196
|
110197
|
110198
|
110199
|
110201
|
110202
|
110203
|
110204
|
110205
|
110206
|
110207
|
110208
|
111837
|
111838
|
111839
|
111840
|
111841
|
111842
|
111843
|
111844
|
111845
|
111846
|
111847
|
111848
|
111874
|
111880
|
111881
|
111883
|
111884
|
111885
|
111886
|
111887
|
111888
|
111889
|
111890
|
111891
|
111892
|
111893
|
111897
|
111899
|
111900
|
111901
|
111902
|
111903
|
111904
|
111905
|
111906
|
111907
|
111908
|
111909
|
111910
|
111911
|
111912
|
111913
|
113398
|
113399
|
113400
|
113401
|
113402
|
113403
|
113404
|
113405
|
113406
|
113407
|
113408
|
113409
|
113410
|
113411
|
113412
|
113413
|
113463
|
113464
|
113465
|
113466
|
113467
|
113468
|
113469
|
113470
|
113471
|
113472
|
113473
|
113474
|
113475
|
113476
|
113477
|
113478
|
113479
|
113522
|
113549
| 113584