Bugzilla – Attachment 37487 Details for
Bug 8000
Test mode for notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8000: Replace Data::Validate::Email with Email::Valid
Bug-8000-Replace-DataValidateEmail-with-EmailValid.patch (text/plain), 3.09 KB, created by
Mark Tompsett
on 2015-04-03 17:48:37 UTC
(
hide
)
Description:
Bug 8000: Replace Data::Validate::Email with Email::Valid
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-04-03 17:48:37 UTC
Size:
3.09 KB
patch
obsolete
>From 2796c406a22267547910d9962cc15fd0792fee26 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 19 Mar 2014 10:37:57 +0100 >Subject: [PATCH] Bug 8000: Replace Data::Validate::Email with Email::Valid > >--- > C4/Installer/PerlDependencies.pm | 5 ----- > C4/Letters.pm | 10 +++++----- > 2 files changed, 5 insertions(+), 10 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index 9996ef1..67ec808 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -737,11 +737,6 @@ our $PERL_DEPS = { > 'required' => '0', > 'min_ver' => '5.61', > }, >- 'Data::Validate::Email' => { >- 'usage' => 'Email validation', >- 'required' => '1', >- 'min_ver' => '0.04', >- }, > }; > > 1; >diff --git a/C4/Letters.pm b/C4/Letters.pm >index eb908fa..abc4350 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -35,7 +35,7 @@ use Date::Calc qw( Add_Delta_Days ); > use Encode; > use Carp; > use Koha::Email; >-use Data::Validate::Email qw(is_email); >+use Email::Valid; > > use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > >@@ -406,7 +406,7 @@ sub SendAlerts { > my $borinfo = C4::Members::GetMember('borrowernumber' => $_->{'borrowernumber'}); > my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo'); > my $email = $sendAllEmailsTo; >- if (!($sendAllEmailsTo && is_email($sendAllEmailsTo))){ >+ if (!($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo))){ > $email = $borinfo->{email} or next; > } > >@@ -525,7 +525,7 @@ sub SendAlerts { > my $emailsCC = join( ',', @cc); > my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo'); > # some validation. This could be improved. >- if ($sendAllEmailsTo && is_email($sendAllEmailsTo) ) { >+ if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) ) { > $emailsTo = $sendAllEmailsTo; > $emailsCC = ''; > } >@@ -585,7 +585,7 @@ sub SendAlerts { > my $email = Koha::Email->new(); > my $emailaddr = $externalid->{'emailaddr'}; > my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo'); >- $emailaddr = $sendAllEmailsTo if ($sendAllEmailsTo && is_email($sendAllEmailsTo) ); >+ $emailaddr = $sendAllEmailsTo if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) ); > my %mail = $email->create_message_headers( > { > to => $emailaddr, >@@ -1150,7 +1150,7 @@ sub _send_message_by_email { > $to_address = C4::Members::GetNoticeEmailAddress( $message->{'borrowernumber'} ); > } > my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo'); >- $to_address = $sendAllEmailsTo if ($sendAllEmailsTo && is_email($sendAllEmailsTo) ); >+ $to_address = $sendAllEmailsTo if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) ); > unless ($to_address) { > if (!$member) { > warn "FAIL: No 'to_address' and INVALID borrowernumber ($message->{borrowernumber})"; >-- >1.9.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 8000
:
21976
|
22315
|
24784
|
25917
|
25919
|
25920
|
25923
|
25924
|
25925
|
25926
|
25927
|
25928
|
25939
|
25950
|
25951
|
26446
|
37463
|
37464
|
37465
|
37466
|
37467
|
37468
|
37469
|
37472
|
37473
|
37474
|
37475
|
37476
|
37477
|
37478
|
37481
|
37482
|
37483
|
37484
|
37485
|
37486
|
37487
|
39985
|
39986
|
39987
|
39988
|
39989
|
39990
|
39991
|
39992
|
40215
|
40216
|
40217
|
40218
|
40219
|
40220
|
40221
|
40222
|
40223
|
40224
|
40225
|
40226
|
40227
|
40228
|
40229
|
40230
|
46354
|
46355
|
46356
|
46357
|
46358
|
46359
|
46360
|
46361
|
46362
|
49991
|
49992
|
49993
|
49998
|
49999
|
50000
|
55940
|
58434
|
62863
|
67155
|
70086
|
70087
|
70484
|
74110
|
74111
|
74848
|
80370
|
81487
|
81488
|
81589
|
81590
|
81591
|
84801
|
84802
|
84803
|
84804
|
84805
|
86861
|
86862
|
86863
|
86864
|
86865
|
88874
|
88875
|
88876
|
88877
|
88878
|
88879