Bugzilla – Attachment 150976 Details for
Bug 33578
Cannot edit patron restriction types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33578: Fix controller when editing a restriction type
Bug-33578-Fix-controller-when-editing-a-restrictio.patch (text/plain), 1.22 KB, created by
Jonathan Druart
on 2023-05-10 11:54:54 UTC
(
hide
)
Description:
Bug 33578: Fix controller when editing a restriction type
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-05-10 11:54:54 UTC
Size:
1.22 KB
patch
obsolete
>From 44a0a1a6e6ebf09b0369d22e6ed397877fbaef63 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 10 May 2023 13:53:20 +0200 >Subject: [PATCH] Bug 33578: Fix controller when editing a restriction type > >Do not display a warning when we are editing a restriction type and no >other types with this description exists. >--- > admin/restrictions.pl | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/admin/restrictions.pl b/admin/restrictions.pl >index 06812c0bfae..ab0c384212d 100755 >--- a/admin/restrictions.pl >+++ b/admin/restrictions.pl >@@ -58,10 +58,13 @@ if ( $op eq 'add_form') { > > if ($is_a_modif) { > # Check whether another restriction already has this display text >- my $dupe = Koha::Patron::Restriction::Types->find({ >- display_text => $display_text >- }); >- if ($dupe) { >+ my $dupe = Koha::Patron::Restriction::Types->search( >+ { >+ code => { '!=' => $code }, >+ display_text => $display_text, >+ } >+ ); >+ if ($dupe->count) { > push @messages, { > type => 'error', code => 'duplicate_display_text' > }; >-- >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 33578
:
150957
|
150976
|
151478
|
151479
|
152610
|
152611