X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=blobdiff_plain;f=includes%2FPreferences.php;h=3f56240f1666e2916f5440010afa804127a30431;hb=62d543af640479a1ecbd4de69b3f975e509ca1ab;hp=66a81524aaf4579445e3caa8b33e5580761aec73;hpb=47b93ded1388ce5712d0a816db4ddd3466609bcd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Preferences.php b/includes/Preferences.php index 66a81524aa..3f56240f16 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -544,12 +544,14 @@ class Preferences { ]; } 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'] = [ @@ -1042,10 +1044,14 @@ class Preferences { $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',