* (bug 22747) "Reveal my e-mail address in notification e-mails" preference is now...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 6 Mar 2010 20:49:19 +0000 (20:49 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 6 Mar 2010 20:49:19 +0000 (20:49 +0000)
RELEASE-NOTES
includes/Preferences.php

index 2978fa9..baf3a60 100644 (file)
@@ -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
index 2f8398a..28edc4b 100644 (file)
@@ -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,
-                                       );
                }
        }