[Koha-bugs] [Bug 12532] Redirect guarantee email to guarantor
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Mar 31 02:02:37 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12532
--- Comment #10 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 36752
--> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36752
Bug 12532 - Redirect guarantee email to guarantor
Review of attachment 36752:
--> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=12532&attachment=36752)
-----------------------------------------------------------------
::: C4/Members.pm
@@ +1562,5 @@
> + my $enableRedirectGuaranteeEmail = C4::Context->preference("EnableRedirectGuaranteeEmail");
> + if (!$enableRedirectGuaranteeEmail){
> + $borrowerNumberToSendEmail = $borrowernumber;
> + $guarantorid = undef;
> + }
This logic works, but it is not clear to the person who reads code.
@@ +1574,5 @@
> + my $guarantor = C4::Members::GetMember( 'borrowernumber' => $guarantorid );
> + if ( $guarantor ){
> + $to_address = $guarantor->{ $which_address };
> + }
> + }
Mixing which_address comparisons with guarantorid logic in the same if
structure level is not good coding style in my opinion.
::: installer/data/mysql/sysprefs.sql
@@ +116,4 @@
> ('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'),
> ('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''),
> ('EnableSearchHistory','0','','Enable or disable search history','YesNo'),
> +('EnableRedirectGuaranteeEmail', '0', NULL, 'Enable the ability to redirect guarantee email messages to guarantor.', 'YesNo'),
R comes before S. :)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list