Merge "mediawiki.page.ready: Load 'SearchInputWidget' too"
[lhc/web/wiklou.git] / includes / Preferences.php
index 54176a6..559d4ab 100644 (file)
@@ -1042,10 +1042,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',
@@ -1301,6 +1305,7 @@ class Preferences {
 
                $htmlForm->setModifiedUser( $user );
                $htmlForm->setId( 'mw-prefs-form' );
+               $htmlForm->setAutocomplete( 'off' );
                $htmlForm->setSubmitText( $context->msg( 'saveprefs' )->text() );
                # Used message keys: 'accesskey-preferences-save', 'tooltip-preferences-save'
                $htmlForm->setSubmitTooltip( 'preferences-save' );