Bugzilla – Attachment 100936 Details for
Bug 22823
Koha::Library needs a method for obtaining the inbound email address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22823: Rename method with ->inbound_email_address
Bug-22823-Rename-method-with--inboundemailaddress.patch (text/plain), 2.84 KB, created by
Jonathan Druart
on 2020-03-18 09:48:55 UTC
(
hide
)
Description:
Bug 22823: Rename method with ->inbound_email_address
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-18 09:48:55 UTC
Size:
2.84 KB
patch
obsolete
>From a874e486912c1ca66e79af3afe30c030a7493ea0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 18 Mar 2020 10:07:02 +0100 >Subject: [PATCH] Bug 22823: Rename method with ->inbound_email_address > >Make the name obvious it's not an email address for "from" > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Library.pm | 6 +++--- > t/db_dependent/Koha/Libraries.t | 10 +++++----- > 2 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/Koha/Library.pm b/Koha/Library.pm >index 965de87404..697c745c5b 100644 >--- a/Koha/Library.pm >+++ b/Koha/Library.pm >@@ -65,15 +65,15 @@ sub get_effective_marcorgcode { > return $self->marcorgcode || C4::Context->preference("MARCOrgCode"); > } > >-=head3 get_effective_email >+=head3 inbound_email_address > >- my $to_email = Koha::Library->get_effective_email; >+ my $to_email = Koha::Library->inbound_email_address; > > Returns an effective email address which should be accessible to librarians at the branch. > > =cut > >-sub get_effective_email { >+sub inbound_email_address { > my ($self) = @_; > > return >diff --git a/t/db_dependent/Koha/Libraries.t b/t/db_dependent/Koha/Libraries.t >index 874b3a316b..478388917b 100644 >--- a/t/db_dependent/Koha/Libraries.t >+++ b/t/db_dependent/Koha/Libraries.t >@@ -452,7 +452,7 @@ subtest '->get_effective_marcorgcode' => sub { > $schema->storage->txn_rollback; > }; > >-subtest '->get_effective_email' => sub { >+subtest '->inbound_email_address' => sub { > > plan tests => 4; > >@@ -471,19 +471,19 @@ subtest '->get_effective_email' => sub { > t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'admin@mylibrary.com' ); > t::lib::Mocks::mock_preference( 'ReplytoDefault', 'reply@mylibrary.com' ); > >- is( $library_1->get_effective_email, $library_1->branchreplyto, >+ is( $library_1->inbound_email_address, $library_1->branchreplyto, > 'If defined, use branches replyto address'); > > $library_1->branchreplyto(undef)->store(); >- is( $library_1->get_effective_email, $library_1->branchemail, >+ is( $library_1->inbound_email_address, $library_1->branchemail, > 'Fallback to branches email address when branchreplyto is undefined'); > > $library_1->branchemail(undef)->store(); >- is( $library_1->get_effective_email, 'reply@mylibrary.com', >+ is( $library_1->inbound_email_address, 'reply@mylibrary.com', > 'Fallback to ReplytoDefault email address when branchreplyto and branchemail are undefined'); > > t::lib::Mocks::mock_preference( 'ReplytoDefault', undef ); >- is( $library_1->get_effective_email, 'admin@mylibrary.com', >+ is( $library_1->inbound_email_address, 'admin@mylibrary.com', > 'Fallback to KohaAdminEmailAddress email address when branchreplyto, branchemail and eplytoDefault are undefined'); > > $schema->storage->txn_rollback; >-- >2.20.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 22823
:
99539
|
99554
|
99555
|
99726
|
99728
|
100934
|
100935
| 100936 |
100937