Bugzilla – Attachment 153769 Details for
Bug 33940
Move get_cardnumber_length and checkcardnumber to Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33940: Fix messages we sent to templates
Bug-33940-Fix-messages-we-sent-to-templates.patch (text/plain), 2.53 KB, created by
Jonathan Druart
on 2023-07-21 10:03:29 UTC
(
hide
)
Description:
Bug 33940: Fix messages we sent to templates
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-07-21 10:03:29 UTC
Size:
2.53 KB
patch
obsolete
>From 363fefba8ced45eca804e4ada6c0dec6a61a59b0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 21 Jul 2023 12:03:07 +0200 >Subject: [PATCH] Bug 33940: Fix messages we sent to templates > >please squash with the first patch >--- > installer/onboarding.pl | 3 ++- > members/memberentry.pl | 3 ++- > opac/opac-memberentry.pl | 3 ++- > 3 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/installer/onboarding.pl b/installer/onboarding.pl >index a8e63f066a5..457f1fe278f 100755 >--- a/installer/onboarding.pl >+++ b/installer/onboarding.pl >@@ -143,7 +143,8 @@ if ( $step == 3 ) { > > my $is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber->is_valid($cardnumber); > unless ( $is_cardnumber_valid ) { >- for my $message ( @{ $is_cardnumber_valid->messages } ) { >+ for my $m ( @{ $is_cardnumber_valid->messages } ) { >+ my $message = $m->message; > if ( $message eq 'already_exists' ) { > push @messages, { code => 'ERROR_cardnumber_already_exists' }; > } >diff --git a/members/memberentry.pl b/members/memberentry.pl >index d9b027070f7..35d9b0bd87b 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -295,7 +295,8 @@ if ($op eq 'save' || $op eq 'insert'){ > > my $is_valid = Koha::Policy::Patrons::Cardnumber->is_valid($newdata{cardnumber}, $patron ); > unless ($is_valid) { >- for my $message ( @{ $is_valid->messages } ) { >+ for my $m ( @{ $is_valid->messages } ) { >+ my $message = $m->message; > if ( $message eq 'already_exists' ) { > push @messages, { code => 'ERROR_cardnumber_already_exists' }; > } elsif ( $message eq 'invalid_length' ) { >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index bc922a9ee04..9af4a2371d3 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -140,7 +140,8 @@ if ( $action eq 'create' ) { > my $patron = Koha::Patrons->find($borrower{borrowernumber}); > $is_cardnumber_valid = Koha::Policy::Patrons::Cardnumber->is_valid($borrower{cardnumber}, $patron); > unless ($is_cardnumber_valid) { >- for my $message ( @{ $is_cardnumber_valid->messages } ) { >+ for my $m ( @{ $is_cardnumber_valid->messages } ) { >+ my $message = $m->message; > if ( $message eq 'already_exists' ) { > $template->param( cardnumber_already_exists => 1 ); > } elsif ( $message eq 'invalid_length' ) { >-- >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 33940
:
152109
|
153758
|
153759
|
153763
|
153764
|
153766
|
153768
|
153769
|
153770
|
153771
|
153772
|
153773
|
155687
|
155688
|
155689