Bugzilla – Attachment 125394 Details for
Bug 29019
Unable to delete HTML customization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29019: Restore eval call
Bug-29019-Restore-eval-call.patch (text/plain), 986 bytes, created by
Jonathan Druart
on 2021-09-28 10:44:11 UTC
(
hide
)
Description:
Bug 29019: Restore eval call
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-09-28 10:44:11 UTC
Size:
986 bytes
patch
obsolete
>From f94150f31865096630106fa338a6be23c5ef1927 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 28 Sep 2021 12:43:07 +0200 >Subject: [PATCH] Bug 29019: Restore eval call > >But fix it (pass an arrayref). We need the eval to catch possible errors. >--- > tools/additional-contents.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/additional-contents.pl b/tools/additional-contents.pl >index 288c6e1ab70..bddbb844b96 100755 >--- a/tools/additional-contents.pl >+++ b/tools/additional-contents.pl >@@ -174,7 +174,7 @@ elsif ( $op eq 'add_validate' ) { > elsif ( $op eq 'delete_confirmed' ) { > my @ids = $cgi->multi_param('ids'); > my $deleted = >- map { Koha::AdditionalContents->find($_)->delete() } @ids; >+ eval { Koha::AdditionalContents->search( { idnew => \@ids } )->delete; }; > > if ( $@ or not $deleted ) { > push @messages, { type => 'error', code => 'error_on_delete' }; >-- >2.25.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 29019
:
125223
|
125278
|
125339
| 125394