jenkins-bot has submitted this change and it was merged.

Change subject: Made the VERP address generation optional
......................................................................


Made the VERP address generation optional

Now, the admin can chose whether or not to start producing VERP address
on send emails.

Change-Id: I0e62994bcfe709c8969379f3bea159c9b52d0dfb
---
M BounceHandler.php
M BounceHandlerHooks.php
2 files changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Hoo man: Looks good to me, but someone else must approve
  01tonythomas: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  Nemo bis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/BounceHandler.php b/BounceHandler.php
index 308cdf3..7ffd7c3 100644
--- a/BounceHandler.php
+++ b/BounceHandler.php
@@ -49,6 +49,7 @@
 
 /**
  * VERP Configurations
+ * $wgGenerateVERP -  Toggle VERP generation
  * wgVERPprefix - The prefix of the VERP address.
  * wgVERPdomainPart - The domain part of the VERP email address, defaults to 
$wgServerName
  * wgVERPalgorithm - Algorithm to hash the return path address.Possible 
algorithms are
@@ -56,6 +57,7 @@
  * wgVERPsecret - The secret key to hash the return path address
  * wgBounceHandlerUnconfirmUsers - Toggle the user un-subscribe action
  */
+$wgGenerateVERP = true;
 $wgVERPprefix = 'wiki';
 $wgVERPdomainPart = null; //set this only if you want the domain part of your 
email different from your wgServerName
 $wgVERPalgorithm = 'md5';
diff --git a/BounceHandlerHooks.php b/BounceHandlerHooks.php
index 8139481..5e43ad6 100644
--- a/BounceHandlerHooks.php
+++ b/BounceHandlerHooks.php
@@ -14,7 +14,8 @@
         * @throws InvalidArgumentException
         */
        public static function onVERPAddressGenerate( array $recip, 
&$returnPath ) {
-               if ( count( $recip ) === 1 ) {
+               global $wgGenerateVERP;
+               if ( $wgGenerateVERP && count( $recip ) === 1 ) {
                        self::generateVerp( $recip[0], $returnPath );
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/172788
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e62994bcfe709c8969379f3bea159c9b52d0dfb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BounceHandler
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <[email protected]>
Gerrit-Reviewer: 01tonythomas <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jgreen <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to