*/
$wgDefaultUserOptions = [
'ccmeonemails' => 0,
- 'cols' => 80,
+ 'cols' => 80, // @deprecated since 1.29 No longer used in core
'date' => 'default',
'diffonly' => 0,
'disablemail' => 0,
'rcdays' => 7,
'rcenhancedfilters' => 0,
'rclimit' => 50,
- 'rows' => 25,
+ 'rows' => 25, // @deprecated since 1.29 No longer used in core
'showhiddencats' => 0,
'shownumberswatching' => 1,
'showtoolbar' => 1,
$attribs = $customAttribs + [
'accesskey' => ',',
'id' => $name,
- 'cols' => $user->getIntOption( 'cols' ),
- 'rows' => $user->getIntOption( 'rows' ),
+ 'cols' => 80,
+ 'rows' => 25,
// Avoid PHP notices when appending preferences
// (appending allows customAttribs['style'] to still work).
'style' => ''
/** @var array */
protected static $saveFilters = [
'timecorrection' => [ 'Preferences', 'filterTimezoneInput' ],
- 'cols' => [ 'Preferences', 'filterIntval' ],
- 'rows' => [ 'Preferences', 'filterIntval' ],
'rclimit' => [ 'Preferences', 'filterIntval' ],
'wllimit' => [ 'Preferences', 'filterIntval' ],
'searchlimit' => [ 'Preferences', 'filterIntval' ],
]
];
}
- $defaultPreferences['cols'] = [
- 'type' => 'int',
- 'label-message' => 'columns',
- 'section' => 'editing/editor',
- 'min' => 4,
- 'max' => 1000,
- ];
- $defaultPreferences['rows'] = [
- 'type' => 'int',
- 'label-message' => 'rows',
- 'section' => 'editing/editor',
- 'min' => 4,
- 'max' => 1000,
- ];
+
if ( $user->isAllowed( 'minoredit' ) ) {
$defaultPreferences['minordefault'] = [
'type' => 'toggle',
'label-message' => 'tog-minordefault',
];
}
+
$defaultPreferences['forceeditsummary'] = [
'type' => 'toggle',
'section' => 'editing/editor',
'textarea',
[
'readonly' => 'readonly',
- 'cols' => $user->getIntOption( 'cols' ),
- 'rows' => $user->getIntOption( 'rows' )
+ 'cols' => 80,
+ 'rows' => 25
],
$content->getNativeData() . "\n"
);
? 'filereuploadsummary'
: 'fileuploadsummary',
'default' => $this->mComment,
- 'cols' => $this->getUser()->getIntOption( 'cols' ),
+ 'cols' => 80,
'rows' => 8,
]
];
"saveprefs": "Save",
"restoreprefs": "Restore all default settings (in all sections)",
"prefs-editing": "Editing",
- "rows": "Rows:",
- "columns": "Columns:",
"searchresultshead": "Search",
"stub-threshold": "Threshold for stub link formatting ($1):",
"stub-threshold-sample-link": "sample",
"saveprefs": "Button for saving changes in the preferences page.\n\nSee also:\n* {{msg-mw|Saveprefs}}\n* {{msg-mw|Accesskey-preferences-save}}\n* {{msg-mw|Tooltip-preferences-save}}\n{{Identical|Save}}",
"restoreprefs": "Used as link text in [[Special:Preferences]]. The link points to [[Special:Preferences/reset]] which shows the \"Restore all default settings\" form.\n\nAlso used as label for the Submit button in [[Special:Preferences/reset]].",
"prefs-editing": "Title of a tab in [[Special:Preferences]].\nWhen changing this message, please also update {{msg-mw|vector-editwarning-warning}} which references to this message.\n{{Identical|Editing}}",
- "rows": "Used on [[Special:Preferences]], \"Editing\" section in the \"Size of editing window\" fieldset.\n{{Identical|Row}}",
- "columns": "Used on [[Special:Preferences]], \"Editing\" section in the \"Size of editing window\" fieldset.\n{{Identical|Column}}",
"searchresultshead": "Replaced by {{msg-mw|prefs-searchoptions}}, though may still be used in some extensions. DEPRECATED.\n\n{{Identical|Search}}",
"stub-threshold": "Used in [[Special:Preferences]], \"Advanced options\" section. The setting allows the user to select a threshold value, in bytes, from a predefined list of options. Any links that lead to pages smaller than the threshold (\"stub links\") will be styled differently.\n\nParameters:\n* $1: the text of {{msg-mw|stub-threshold-sample-link}}, styled as a stub link",
"stub-threshold-sample-link": "Passed as a parameter to the {{msg-mw|stub-threshold}} message.\n{{Identical|Sample}}",
$user = $this->getMutableTestUser()->getUser();
$user->setOption( 'userjs-someoption', 'test' );
- $user->setOption( 'cols', 200 );
+ $user->setOption( 'rclimit', 200 );
$user->saveSettings();
$user = User::newFromName( $user->getName() );
$user->load( User::READ_LATEST );
$this->assertEquals( 'test', $user->getOption( 'userjs-someoption' ) );
- $this->assertEquals( 200, $user->getOption( 'cols' ) );
+ $this->assertEquals( 200, $user->getOption( 'rclimit' ) );
$user = User::newFromName( $user->getName() );
MediaWikiServices::getInstance()->getMainWANObjectCache()->clearProcessCache();
$this->assertEquals( 'test', $user->getOption( 'userjs-someoption' ) );
- $this->assertEquals( 200, $user->getOption( 'cols' ) );
+ $this->assertEquals( 200, $user->getOption( 'rclimit' ) );
}
/**
public function testAnonOptions() {
global $wgDefaultUserOptions;
$this->user->setOption( 'userjs-someoption', 'test' );
- $this->assertEquals( $wgDefaultUserOptions['cols'], $this->user->getOption( 'cols' ) );
+ $this->assertEquals( $wgDefaultUserOptions['rclimit'], $this->user->getOption( 'rclimit' ) );
$this->assertEquals( 'test', $this->user->getOption( 'userjs-someoption' ) );
}