Bugzilla – Attachment 26446 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.19 KB, created by
Jonathan Druart
on 2014-03-19 09:41:37 UTC
(
hide
)
Description:
Bug 8000: Replace Data::Validate::Email with Email::Valid
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-03-19 09:41:37 UTC
Size:
3.19 KB
patch
obsolete
>From 9e1e9a27c28acf555a88bbecea38125bd293876e 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 | 4 ++-- > C4/Letters.pm | 10 +++++----- > 2 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index 7fcbd1c..734cf16 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -699,10 +699,10 @@ our $PERL_DEPS = { > 'required' => '0', > 'min_ver' => '0.73', > }, >- 'Data::Validate::Email' => { >+ 'Email::Valid' => { > 'usage' => 'Email validation', > 'required' => '1', >- 'min_ver' => '0.04', >+ 'min_ver' => '0.190', > }, > }; > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 5780960..d3c60bd 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -34,7 +34,7 @@ use Koha::DateUtils; > use Date::Calc qw( Add_Delta_Days ); > use Encode; > use Carp; >-use Data::Validate::Email qw(is_email); >+use Email::Valid; > > use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > >@@ -288,7 +288,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; > } > >@@ -376,7 +376,7 @@ sub SendAlerts { > > my $allemails = join( ',', @email); > my $sendAllEmailsTo = C4::Context->preference('SendAllEmailsTo'); >- $allemails = $sendAllEmailsTo if ($sendAllEmailsTo && is_email($sendAllEmailsTo) ); >+ $allemails = $sendAllEmailsTo if ($sendAllEmailsTo && Email::Valid->address($sendAllEmailsTo) ); > # ... then send mail > my %mail = ( > To => $allemails, >@@ -417,7 +417,7 @@ sub SendAlerts { > return { error => "no_email" } unless $externalid->{'emailaddr'}; > 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) ); > # ... then send mail > my %mail = ( > To => $emailaddr, >@@ -944,7 +944,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.7.10.4
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