Bugzilla – Attachment 173577 Details for
Bug 35625
Add support for system flag to additional fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35625: Prevent deletion at controller
Bug-35625-Prevent-deletion-at-controller.patch (text/plain), 1.45 KB, created by
Martin Renvoize (ashimema)
on 2024-10-28 17:14:35 UTC
(
hide
)
Description:
Bug 35625: Prevent deletion at controller
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-28 17:14:35 UTC
Size:
1.45 KB
patch
obsolete
>From 0dbd231e88fd5759a2425b8bfc065111d87c2140 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 21 Dec 2023 09:45:26 +0000 >Subject: [PATCH] Bug 35625: Prevent deletion at controller > >--- > admin/additional-fields.pl | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/admin/additional-fields.pl b/admin/additional-fields.pl >index 11bf70814c4..d07fbd3db3b 100755 >--- a/admin/additional-fields.pl >+++ b/admin/additional-fields.pl >@@ -67,8 +67,10 @@ if ( $op eq 'cud-add' ) { > > eval { > my $af = Koha::AdditionalFields->find($field_id); >- $af->set($set_fields); >- $updated = $af->store ? 1 : 0; >+ if ( !$af->is_system ) { >+ $af->set($set_fields); >+ $updated = $af->store ? 1 : 0; >+ } > }; > push @messages, { > code => 'cud-update', >@@ -107,7 +109,9 @@ if ( $op eq 'cud-delete' ) { > my $deleted = 0; > eval { > my $af = Koha::AdditionalFields->find($field_id); >- $deleted = $af->delete; >+ if ( !$af->is_system ) { >+ $deleted = $af->delete; >+ } > }; > push @messages, { > code => 'cud-delete', >@@ -140,4 +144,4 @@ $template->param( > messages => \@messages, > ); > >-output_html_with_http_headers $input, $cookie, $template->output; >\ No newline at end of file >+output_html_with_http_headers $input, $cookie, $template->output; >-- >2.47.0
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 35625
:
160171
|
160172
|
160173
|
160174
|
160175
|
160176
|
173567
|
173568
|
173569
|
173570
|
173571
|
173573
|
173574
|
173575
|
173576
| 173577 |
173578