];
}
if ( $config->get( 'EnotifUserTalk' ) || $config->get( 'EnotifWatchlist' ) ) {
- $defaultPreferences['enotifminoredits'] = [
- 'type' => 'toggle',
- 'section' => 'personal/email',
- 'label-message' => 'tog-enotifminoredits',
- 'disabled' => $disableEmailPrefs,
- ];
+ if ( $config->get( 'EnotifMinorEdits' ) ) {
+ $defaultPreferences['enotifminoredits'] = [
+ 'type' => 'toggle',
+ 'section' => 'personal/email',
+ 'label-message' => 'tog-enotifminoredits',
+ 'disabled' => $disableEmailPrefs,
+ ];
+ }
if ( $config->get( 'EnotifRevealEditorAddress' ) ) {
$defaultPreferences['enotifrevealaddr'] = [
$watchTypes['rollback'] = 'watchrollback';
}
+ if ( $user->isAllowed( 'upload' ) ) {
+ $watchTypes['upload'] = 'watchuploads';
+ }
+
foreach ( $watchTypes as $action => $pref ) {
if ( $user->isAllowed( $action ) ) {
// Messages:
- // tog-watchdefault, tog-watchmoves, tog-watchdeletion, tog-watchcreations
+ // tog-watchdefault, tog-watchmoves, tog-watchdeletion, tog-watchcreations, tog-watchuploads
// tog-watchrollback
$defaultPreferences[$pref] = [
'type' => 'toggle',