Bugzilla – Attachment 192052 Details for
Bug 24679
Allow to apply a MARC modification template in export tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24679: Return the correct id in AddModificationTemplate
Bug-24679-Return-the-correct-id-in-AddModification.patch (text/plain), 1.24 KB, created by
Katrin Fischer
on 2026-01-26 18:09:53 UTC
(
hide
)
Description:
Bug 24679: Return the correct id in AddModificationTemplate
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2026-01-26 18:09:53 UTC
Size:
1.24 KB
patch
obsolete
>From cabdfc88ccff23d10f6661dfa7797ff98cce4637 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 13 Oct 2020 10:09:37 +0200 >Subject: [PATCH] Bug 24679: Return the correct id in AddModificationTemplate > >'name' is not unique, and should not be used to retrieve the last >inserted id > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/MarcModificationTemplates.pm | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > >diff --git a/C4/MarcModificationTemplates.pm b/C4/MarcModificationTemplates.pm >index 100a4cce406..e633cc10821 100644 >--- a/C4/MarcModificationTemplates.pm >+++ b/C4/MarcModificationTemplates.pm >@@ -112,10 +112,7 @@ sub AddModificationTemplate { > my $sth = $dbh->prepare("INSERT INTO marc_modification_templates ( name ) VALUES ( ? )"); > $sth->execute($template_name); > >- $sth = $dbh->prepare("SELECT * FROM marc_modification_templates WHERE name = ?"); >- $sth->execute($template_name); >- my $row = $sth->fetchrow_hashref(); >- my $template_id = $row->{'template_id'}; >+ my $template_id = $dbh->last_insert_id(undef, undef, 'marc_modification_templates'); > > if ($template_id_copy) { > my @actions = GetModificationTemplateActions($template_id_copy); >-- >2.39.5
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 24679
:
99175
|
99304
|
99700
|
111519
|
111520
|
111521
|
186343
|
186344
|
186345
|
192051
| 192052 |
192053
|
192091