From: Chad Horohoe Date: Sat, 4 Jul 2009 01:46:41 +0000 (+0000) Subject: (bug 19468) $wgEnotifWatchlist disabled, but option available on preferences X-Git-Tag: 1.31.0-rc.0~41111 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=c27ffd34fa64081a000347a0bcb036b7d7821848;p=lhc%2Fweb%2Fwiklou.git (bug 19468) $wgEnotifWatchlist disabled, but option available on preferences --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5400a608bb..dc66781bb9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -227,6 +227,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 19509) Uploading to a file named '0' previously treated it as null input and attempted to upload with the source name. Now warns about not having an extension (since 0.ext is perfectly valid) +* (bug 19468) Enotif preferences are now only displayed when they are turned on == API changes in 1.16 == diff --git a/includes/Preferences.php b/includes/Preferences.php index a7bd902585..e8e7e146fa 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -355,28 +355,36 @@ class Preferences { 'disabled' => $disableEmailPrefs, ); } - - $defaultPreferences['enotifwatchlistpages'] = - array( - 'type' => 'toggle', - 'section' => 'personal/email', - 'label-message' => 'tog-enotifwatchlistpages', - 'disabled' => $disableEmailPrefs, - ); - $defaultPreferences['enotifusertalkpages'] = - array( - 'type' => 'toggle', - 'section' => 'personal/email', - 'label-message' => 'tog-enotifusertalkpages', - 'disabled' => $disableEmailPrefs, - ); - $defaultPreferences['enotifminoredits'] = - array( - 'type' => 'toggle', - 'section' => 'personal/email', - 'label-message' => 'tog-enotifminoredits', - 'disabled' => $disableEmailPrefs, - ); + + global $wgEnotifWatchlist; + if ( $wgEnotifWatchlist ) { + $defaultPreferences['enotifwatchlistpages'] = + array( + 'type' => 'toggle', + 'section' => 'personal/email', + 'label-message' => 'tog-enotifwatchlistpages', + 'disabled' => $disableEmailPrefs, + ); + } + global $wgEnotifUserTalk; + if( $wgEnotifUserTalk ) { + $defaultPreferences['enotifusertalkpages'] = + array( + 'type' => 'toggle', + 'section' => 'personal/email', + 'label-message' => 'tog-enotifusertalkpages', + 'disabled' => $disableEmailPrefs, + ); + } + if( $wgEnotifUserTalk || $wgEnotifWatchlist ) { + $defaultPreferences['enotifminoredits'] = + array( + 'type' => 'toggle', + 'section' => 'personal/email', + 'label-message' => 'tog-enotifminoredits', + 'disabled' => $disableEmailPrefs, + ); + } $defaultPreferences['enotifrevealaddr'] = array( 'type' => 'toggle',