From 493855da50066959c1a88810ef6ce7722d73414d Mon Sep 17 00:00:00 2001 From: withoutaname Date: Fri, 9 May 2014 01:24:27 -0700 Subject: [PATCH] If $wgEnableEmail is false, disable other email settings Bug: 63678 Change-Id: I8464f540f4bd850d6be1c578b043d9702ed8e773 --- includes/Setup.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/includes/Setup.php b/includes/Setup.php index 78655a45de..145f55a6d0 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -627,6 +627,26 @@ $wgTitle = null; $wgDeferredUpdateList = array(); +// Disable all other email settings automatically if $wgEnableEmail +// is set to false. - bug 63678 +if ( !$wgEnableEmail ) { + $wgAllowHTMLEmail = false; + $wgEmailAuthentication = false; // do not require auth if you're not sending email anyway + $wgEnableUserEmail = false; + $wgEnotifFromEditor = false; + $wgEnotifImpersonal = false; + $wgEnotifMaxRecips = 0; + $wgEnotifMinorEdits = false; + $wgEnotifRevealEditorAddress = false; + $wgEnotifUseJobQ = false; + $wgEnotifUseRealName = false; + $wgEnotifUserTalk = false; + $wgEnotifWatchlist = false; + unset( $wgGroupPermissions['user']['sendemail'] ); + $wgUserEmailUseReplyTo = false; + $wgUsersNotifiedOnAllChanges = array(); +} + wfProfileOut( $fname . '-globals' ); wfProfileIn( $fname . '-extensions' ); -- 2.20.1