Bugzilla – Attachment 151023 Details for
Bug 33223
Koha::Patron->notice_email_address isn't consistently used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33223: Replace 'first_valid' with 'notice' for email addresses
Bug-33223-Replace-firstvalid-with-notice-for-email.patch (text/plain), 5.49 KB, created by
Martin Renvoize (ashimema)
on 2023-05-10 16:17:42 UTC
(
hide
)
Description:
Bug 33223: Replace 'first_valid' with 'notice' for email addresses
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-05-10 16:17:42 UTC
Size:
5.49 KB
patch
obsolete
>From 43aca1943fb56799a7c445642453e9a9bcb3b7c8 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 14 Mar 2023 15:07:46 +0000 >Subject: [PATCH] Bug 33223: Replace 'first_valid' with 'notice' for email > addresses > >This patch replaces the uses of first_valid_email_address with >notice_email_address in waiting_holds, transferstoreceive, clubs and >sendbasket so that we take EmailFieldPrimary into account for these >notices too. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc | 6 +++--- > .../prog/en/modules/circ/transferstoreceive.tt | 6 +++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt | 2 +- > opac/opac-sendbasket.pl | 4 ++-- > 4 files changed, 9 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc >index e6caa50f4a..2893d0acbb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc >@@ -54,9 +54,9 @@ > </td> > <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrower.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' patron=reserveloo.borrower invert_name=1 no_title=1 %]</a> > [% IF ( reserveloo.borrower.phone ) %]<br /><span class="patron_phone">[% reserveloo.borrower.phone | html %]</span>[% END %] >- [% IF ( reserveloo.borrower.first_valid_email_address ) %] >- <span class="patron_email"><br /><a href="mailto:[% reserveloo.borrower.first_valid_email_address | uri %]?subject=[% "Hold waiting: " | uri %][% reserveloo.biblio.title | uri %]"> >- [% reserveloo.borrower.first_valid_email_address | html %]</a></span> >+ [% IF ( reserveloo.borrower.notice_email_address ) %] >+ <span class="patron_email"><br /><a href="mailto:[% reserveloo.borrower.notice_email_address | uri %]?subject=[% "Hold waiting: " | uri %][% reserveloo.biblio.title | uri %]"> >+ [% reserveloo.borrower.notice_email_address | html %]</a></span> > [% END %] > </td> > <td>[% Branches.GetName( reserveloo.item.homebranch ) | html %]</td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >index de3ddb3bbc..81b0fbadb5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >@@ -72,11 +72,11 @@ > [% reser.patron.surname | html %][%IF ( reser.patron.firstname ) %], [% reser.patron.firstname | html %][% END %] > </a> > [% IF ( reser.patron.phone ) %]<br />[% reser.patron.phone | html %][% END %] >- [% IF ( reser.patron.first_valid_email_address ) %] >+ [% IF ( reser.patron.notice_email_address ) %] > <br /> > [% BLOCK subject %]Hold:[% END %] >- <a href="mailto:[% reser.patron.first_valid_email_address | uri %]?subject=[% INCLUDE subject %] [% reser.title | uri %]"> >- [% reser.patron.first_valid_email_address | html %] >+ <a href="mailto:[% reser.patron.notice_email_address | uri %]?subject=[% INCLUDE subject %] [% reser.title | uri %]"> >+ [% reser.patron.notice_email_address | html %] > </a> > [% END %] > [% ELSIF ( reser.recall ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt >index 4358d097a3..b18cd068d4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt >@@ -55,7 +55,7 @@ > <td>[% c.name | html %]</td> > <td>[% c.description | html %]</td> > <td> >- [% IF !c.club_template.is_email_required || ( c.club_template.is_email_required && borrower.first_valid_email_address ) %] >+ [% IF !c.club_template.is_email_required || ( c.club_template.is_email_required && borrower.notice_email_address ) %] > <button class="btn btn-xs btn-default" onclick="loadEnrollmentForm([% c.id | html%])"> > <i class="fa fa-plus" aria-hidden="true"></i> Enroll > </button> >diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl >index a273e144a6..ae0ec81e1c 100755 >--- a/opac/opac-sendbasket.pl >+++ b/opac/opac-sendbasket.pl >@@ -48,7 +48,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > my $bib_list = $query->param('bib_list') || ''; > my $email_add = $query->param('email_add'); > >-if ($email_add) { >+if ( $email_add ) { > die "Wrong CSRF token" > unless Koha::Token->new->check_csrf( > { >@@ -58,7 +58,7 @@ if ($email_add) { > ); > > my $patron = Koha::Patrons->find($borrowernumber); >- my $user_email = $patron->first_valid_email_address; >+ my $user_email = $patron->notice_email_address; > > my $comment = $query->param('comment'); > >-- >2.40.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 33223
:
148168
|
151023
|
151024
|
151025
|
151041
|
151042
|
151117
|
151118