From fa55964d72d541aa6c77ea7dfefdef99e5e61512 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 6 Mar 2010 20:49:19 +0000 Subject: [PATCH] * (bug 22747) "Reveal my e-mail address in notification e-mails" preference is now only displayed when relevant --- RELEASE-NOTES | 2 ++ includes/Preferences.php | 17 ++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2978fa989c..baf3a6055f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -40,6 +40,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 22709) IIS7 mishandles redirects generated by OutputPage::output() when the URL contains a colon. * (bug 22353) Categorised recent changes now works again +* (bug 22747) "Reveal my e-mail address in notification e-mails" preference is + now only displayed when relevant == API changes in 1.17 == * (bug 22738) Allow filtering by action type on query=logevent diff --git a/includes/Preferences.php b/includes/Preferences.php index 2f8398a569..28edc4b614 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -433,14 +433,17 @@ class Preferences { 'label-message' => 'tog-enotifminoredits', 'disabled' => $disableEmailPrefs, ); + global $wgEnotifRevealEditorAddress; + if ( $wgEnotifRevealEditorAddress ) { + $defaultPreferences['enotifrevealaddr'] = + array( + 'type' => 'toggle', + 'section' => 'personal/email', + 'label-message' => 'tog-enotifrevealaddr', + 'disabled' => $disableEmailPrefs, + ); + } } - $defaultPreferences['enotifrevealaddr'] = - array( - 'type' => 'toggle', - 'section' => 'personal/email', - 'label-message' => 'tog-enotifrevealaddr', - 'disabled' => $disableEmailPrefs, - ); } } -- 2.20.1