56 'timecorrection' => [
'Preferences',
'filterTimezoneInput' ],
57 'cols' => [
'Preferences',
'filterIntval' ],
58 'rows' => [
'Preferences',
'filterIntval' ],
59 'rclimit' => [
'Preferences',
'filterIntval' ],
60 'wllimit' => [
'Preferences',
'filterIntval' ],
61 'searchlimit' => [
'Preferences',
'filterIntval' ],
74 return self::$saveBlacklist;
84 if ( self::$defaultPreferences ) {
85 return self::$defaultPreferences;
117 # # Remove preferences that wikis don't want to use
118 foreach (
$context->getConfig()->get(
'HiddenPrefs' )
as $pref ) {
124 # # Make sure that form fields have their parent set. See bug 41337.
127 $disable = !
$user->isAllowed(
'editmyoptions' );
130 # # Prod in defaults from the user
132 $prefFromUser = self::getOptionFromUser(
$name, $info,
$user );
133 if ( $disable && !in_array(
$name, self::$saveBlacklist ) ) {
134 $info[
'disabled'] =
'disabled';
137 $globalDefault = isset( $defaultOptions[
$name] )
138 ? $defaultOptions[
$name]
142 if ( isset( $info[
'default'] ) ) {
145 } elseif ( !is_null( $prefFromUser ) &&
146 $field->validate( $prefFromUser,
$user->getOptions() ) ===
true ) {
147 $info[
'default'] = $prefFromUser;
148 } elseif ( $field->validate( $globalDefault,
$user->getOptions() ) ===
true ) {
149 $info[
'default'] = $globalDefault;
151 throw new MWException(
"Global default '$globalDefault' is invalid for field $name" );
170 if ( ( isset( $info[
'type'] ) && $info[
'type'] ==
'multiselect' ) ||
171 ( isset( $info[
'class'] ) && $info[
'class'] ==
'HTMLMultiSelectField' ) ) {
173 $prefix = isset( $info[
'prefix'] ) ? $info[
'prefix'] :
$name;
177 if (
$user->getOption(
"$prefix$value" ) ) {
184 if ( ( isset( $info[
'type'] ) && $info[
'type'] ==
'checkmatrix' ) ||
185 ( isset( $info[
'class'] ) && $info[
'class'] ==
'HTMLCheckMatrix' ) ) {
188 $prefix = isset( $info[
'prefix'] ) ? $info[
'prefix'] :
$name;
191 foreach ( $columns
as $column ) {
192 foreach ( $rows
as $row ) {
193 if (
$user->getOption(
"$prefix$column-$row" ) ) {
194 $val[] =
"$column-$row";
214 $userName =
$user->getName();
216 # # User info #####################################
220 'label-message' => [
'username', $userName ],
221 'default' => $userName,
222 'section' =>
'personal/info',
225 # Get groups to which the user belongs
226 $userEffectiveGroups =
$user->getEffectiveGroups();
227 $userGroups = $userMembers = [];
228 foreach ( $userEffectiveGroups
as $ueg ) {
239 asort( $userGroups );
240 asort( $userMembers );
246 'label' => $context->
msg(
'prefs-memberingroups' )->numParams(
247 count( $userGroups ) )->params( $userName )->parse(),
248 'default' => $context->
msg(
'prefs-memberingroups-type' )
249 ->rawParams(
$lang->commaList( $userGroups ),
$lang->commaList( $userMembers ) )
252 'section' =>
'personal/info',
261 'label-message' =>
'prefs-edits',
262 'default' => $editCount,
263 'section' =>
'personal/info',
266 if (
$user->getRegistration() ) {
267 $displayUser = $context->
getUser();
268 $userRegistration =
$user->getRegistration();
271 'label-message' =>
'prefs-registration',
272 'default' => $context->
msg(
273 'prefs-registration-date-time',
274 $lang->userTimeAndDate( $userRegistration, $displayUser ),
275 $lang->userDate( $userRegistration, $displayUser ),
276 $lang->userTime( $userRegistration, $displayUser )
278 'section' =>
'personal/info',
282 $canViewPrivateInfo =
$user->isAllowed(
'viewmyprivateinfo' );
283 $canEditPrivateInfo =
$user->isAllowed(
'editmyprivateinfo' );
286 $realnameChangeAllowed = $wgDisableAuthManager ? $wgAuth->allowPropChange(
'realname' )
287 : AuthManager::singleton()->allowsPropertyChange(
'realname' );
290 'type' => $canEditPrivateInfo && $realnameChangeAllowed ?
'text' :
'info',
291 'default' =>
$user->getRealName(),
292 'section' =>
'personal/info',
293 'label-message' =>
'yourrealname',
294 'help-message' =>
'prefs-help-realname',
297 $allowPasswordChange = $wgDisableAuthManager ? $wgAuth->allowPasswordChange()
298 : AuthManager::singleton()->allowsAuthenticationDataChange(
300 if ( $canEditPrivateInfo && $allowPasswordChange ) {
302 $context->
msg(
'prefs-resetpass' )->escaped(), [],
309 'label-message' =>
'yourpassword',
310 'section' =>
'personal/info',
317 'label-message' =>
'tog-prefershttps',
318 'help-message' =>
'prefs-help-prefershttps',
319 'section' =>
'personal/info'
325 $languageCode = $config->get(
'LanguageCode' );
326 if ( !array_key_exists( $languageCode,
$languages ) ) {
338 'section' =>
'personal/i18n',
340 'label-message' =>
'yourlanguage',
345 'section' =>
'personal/i18n',
347 $context->
msg(
'parentheses' )
348 ->params( $context->
msg(
'gender-unknown' )->plain() )
349 ->escaped() =>
'unknown',
350 $context->
msg(
'gender-female' )->escaped() =>
'female',
351 $context->
msg(
'gender-male' )->escaped() =>
'male',
353 'label-message' =>
'yourgender',
354 'help-message' =>
'prefs-help-gender',
358 if ( !$config->get(
'DisableLangConversion' ) ) {
360 if ( $langCode == $wgContLang->getCode() ) {
361 $variants = $wgContLang->getVariants();
363 if ( count( $variants ) <= 1 ) {
368 foreach ( $variants
as $v ) {
369 $v = str_replace(
'_',
'-', strtolower( $v ) );
370 $variantArray[$v] =
$lang->getVariantname( $v,
false );
380 'label-message' =>
'yourvariant',
383 'section' =>
'personal/i18n',
384 'help-message' =>
'prefs-help-variant',
396 $toggles = $wgContLang->getExtraUserToggles();
398 foreach ( $toggles
as $toggle ) {
401 'section' =>
'personal/i18n',
402 'label-message' =>
"tog-$toggle",
407 $oldsigWikiText = $wgParser->preSaveTransform(
413 $oldsigHTML = $context->
getOutput()->parseInline( $oldsigWikiText,
true,
true );
417 'label-message' =>
'tog-oldsig',
418 'default' => $oldsigHTML,
419 'section' =>
'personal/signature',
421 $nicknameChangeAllowed = $wgDisableAuthManager ? $wgAuth->allowPropChange(
'nickname' )
422 : AuthManager::singleton()->allowsPropertyChange(
'nickname' );
424 'type' => $nicknameChangeAllowed ?
'text' :
'info',
425 'maxlength' => $config->get(
'MaxSigChars' ),
426 'label-message' =>
'yournick',
427 'validation-callback' => [
'Preferences',
'validateSignature' ],
428 'section' =>
'personal/signature',
429 'filter-callback' => [
'Preferences',
'cleanSignature' ],
433 'label-message' =>
'tog-fancysig',
435 'help-message' =>
'prefs-help-signature',
436 'section' =>
'personal/signature'
441 if ( $config->get(
'EnableEmail' ) ) {
442 if ( $canViewPrivateInfo ) {
443 $helpMessages[] = $config->get(
'EmailConfirmToEdit' )
444 ?
'prefs-help-email-required'
445 :
'prefs-help-email';
447 if ( $config->get(
'EnableUserEmail' ) ) {
449 $helpMessages[] =
'prefs-help-email-others';
452 $emailAddress =
$user->getEmail() ? htmlspecialchars(
$user->getEmail() ) :
'';
453 $emailChangeAllowed = $wgDisableAuthManager ? $wgAuth->allowPropChange(
'emailaddress' )
454 : AuthManager::singleton()->allowsPropertyChange(
'emailaddress' );
455 if ( $canEditPrivateInfo && $emailChangeAllowed ) {
458 $context->
msg(
$user->getEmail() ?
'prefs-changeemail' :
'prefs-setemail' )->escaped(),
462 $emailAddress .= $emailAddress ==
'' ?
$link : (
463 $context->
msg(
'word-separator' )->escaped()
464 . $context->
msg(
'parentheses' )->rawParams(
$link )->escaped()
471 'default' => $emailAddress,
472 'label-message' =>
'youremail',
473 'section' =>
'personal/email',
474 'help-messages' => $helpMessages,
475 # 'cssclass' chosen below
479 $disableEmailPrefs =
false;
481 if ( $config->get(
'EmailAuthentication' ) ) {
482 $emailauthenticationclass =
'mw-email-not-authenticated';
483 if (
$user->getEmail() ) {
484 if (
$user->getEmailAuthenticationTimestamp() ) {
488 $displayUser = $context->
getUser();
489 $emailTimestamp =
$user->getEmailAuthenticationTimestamp();
490 $time =
$lang->userTimeAndDate( $emailTimestamp, $displayUser );
491 $d =
$lang->userDate( $emailTimestamp, $displayUser );
492 $t =
$lang->userTime( $emailTimestamp, $displayUser );
493 $emailauthenticated = $context->
msg(
'emailauthenticated',
494 $time, $d,
$t )->parse() .
'<br />';
495 $disableEmailPrefs =
false;
496 $emailauthenticationclass =
'mw-email-authenticated';
498 $disableEmailPrefs =
true;
499 $emailauthenticated = $context->
msg(
'emailnotauthenticated' )->parse() .
'<br />' .
502 $context->
msg(
'emailconfirmlink' )->escaped()
504 $emailauthenticationclass =
"mw-email-not-authenticated";
507 $disableEmailPrefs =
true;
508 $emailauthenticated = $context->
msg(
'noemailprefs' )->escaped();
509 $emailauthenticationclass =
'mw-email-none';
512 if ( $canViewPrivateInfo ) {
516 'section' =>
'personal/email',
517 'label-message' =>
'prefs-emailconfirm-label',
518 'default' => $emailauthenticated,
519 # Apply the same CSS class used on the input to the message:
520 'cssclass' => $emailauthenticationclass,
525 if ( $config->get(
'EnableUserEmail' ) &&
$user->isAllowed(
'sendemail' ) ) {
529 'section' =>
'personal/email',
530 'label-message' =>
'allowemail',
531 'disabled' => $disableEmailPrefs,
535 'section' =>
'personal/email',
536 'label-message' =>
'tog-ccmeonemails',
537 'disabled' => $disableEmailPrefs,
541 if ( $config->get(
'EnotifWatchlist' ) ) {
544 'section' =>
'personal/email',
545 'label-message' =>
'tog-enotifwatchlistpages',
546 'disabled' => $disableEmailPrefs,
549 if ( $config->get(
'EnotifUserTalk' ) ) {
552 'section' =>
'personal/email',
553 'label-message' =>
'tog-enotifusertalkpages',
554 'disabled' => $disableEmailPrefs,
557 if ( $config->get(
'EnotifUserTalk' ) || $config->get(
'EnotifWatchlist' ) ) {
558 if ( $config->get(
'EnotifMinorEdits' ) ) {
561 'section' =>
'personal/email',
562 'label-message' =>
'tog-enotifminoredits',
563 'disabled' => $disableEmailPrefs,
567 if ( $config->get(
'EnotifRevealEditorAddress' ) ) {
570 'section' =>
'personal/email',
571 'label-message' =>
'tog-enotifrevealaddr',
572 'disabled' => $disableEmailPrefs,
586 # # Skin #####################################
589 $skinOptions = self::generateSkinOptions(
$user, $context );
590 if ( $skinOptions ) {
593 'options' => $skinOptions,
595 'section' =>
'rendering/skin',
600 $allowUserCss = $config->get(
'AllowUserCss' );
601 $allowUserJs = $config->get(
'AllowUserJs' );
602 # Create links to user CSS/JS pages for all skins
603 # This code is basically copied from generateSkinOptions(). It'd
604 # be nice to somehow merge this back in there to avoid redundancy.
605 if ( $allowUserCss || $allowUserJs ) {
607 $userName =
$user->getName();
609 if ( $allowUserCss ) {
611 $linkTools[] =
Linker::link( $cssPage, $context->
msg(
'prefs-custom-css' )->escaped() );
614 if ( $allowUserJs ) {
616 $linkTools[] =
Linker::link( $jsPage, $context->
msg(
'prefs-custom-js' )->escaped() );
622 'default' => $context->
getLanguage()->pipeList( $linkTools ),
623 'label-message' =>
'prefs-common-css-js',
624 'section' =>
'rendering/skin',
635 # # Files #####################################
638 'options' => self::getImageSizes( $context ),
639 'label-message' =>
'imagemaxsize',
640 'section' =>
'rendering/files',
644 'options' => self::getThumbSizes( $context ),
645 'label-message' =>
'thumbsize',
646 'section' =>
'rendering/files',
657 # # Date and time #####################################
658 $dateOptions = self::getDateOptions( $context );
659 if ( $dateOptions ) {
662 'options' => $dateOptions,
664 'section' =>
'rendering/dateformat',
671 $nowlocal =
Xml::element(
'span', [
'id' =>
'wpLocalTime' ],
674 [
'format' =>
false,
'timecorrection' =>
false ] ) .
675 Html::hidden(
'wpServerTime', (
int)substr( $now, 8, 2 ) * 60 + (
int)substr( $now, 10, 2 ) );
680 'label-message' =>
'servertime',
681 'default' => $nowserver,
682 'section' =>
'rendering/timeoffset',
688 'label-message' =>
'localtime',
689 'default' => $nowlocal,
690 'section' =>
'rendering/timeoffset',
694 $tzOffset =
$user->getOption(
'timecorrection' );
695 $tz = explode(
'|', $tzOffset, 3 );
697 $tzOptions = self::getTimezoneOptions( $context );
699 $tzSetting = $tzOffset;
700 if ( count( $tz ) > 1 && $tz[0] ==
'Offset' ) {
702 $tzSetting = sprintf(
'%+03d:%02d', floor( $minDiff / 60 ), abs( $minDiff ) % 60 );
703 } elseif ( count( $tz ) > 1 && $tz[0] ==
'ZoneInfo' &&
706 # Timezone offset can vary with DST
707 $userTZ = timezone_open( $tz[2] );
708 if ( $userTZ !==
false ) {
709 $minDiff = floor( timezone_offset_get( $userTZ, date_create(
'now' ) ) / 60 );
710 $tzSetting =
"ZoneInfo|$minDiff|{$tz[2]}";
715 'class' =>
'HTMLSelectOrOtherField',
716 'label-message' =>
'timezonelegend',
717 'options' => $tzOptions,
718 'default' => $tzSetting,
720 'section' =>
'rendering/timeoffset',
730 # # Diffs ####################################
733 'section' =>
'rendering/diffs',
734 'label-message' =>
'tog-diffonly',
738 'section' =>
'rendering/diffs',
739 'label-message' =>
'tog-norollbackdiff',
742 # # Page Rendering ##############################
743 if ( $context->
getConfig()->get(
'AllowUserCssPrefs' ) ) {
747 $context->
msg(
'underline-never' )->text() => 0,
748 $context->
msg(
'underline-always' )->text() => 1,
749 $context->
msg(
'underline-default' )->text() => 2,
751 'label-message' =>
'tog-underline',
752 'section' =>
'rendering/advancedrendering',
756 $stubThresholdValues = [ 50, 100, 500, 1000, 2000, 5000, 10000 ];
757 $stubThresholdOptions = [ $context->
msg(
'stub-threshold-disabled' )->text() => 0 ];
758 foreach ( $stubThresholdValues
as $value ) {
759 $stubThresholdOptions[$context->
msg(
'size-bytes', $value )->text()] =
$value;
764 'section' =>
'rendering/advancedrendering',
765 'options' => $stubThresholdOptions,
767 'label-raw' => $context->
msg(
'stub-threshold' )->rawParams(
768 '<a href="#" class="stub">' .
769 $context->
msg(
'stub-threshold-sample-link' )->parse() .
775 'section' =>
'rendering/advancedrendering',
776 'label-message' =>
'tog-showhiddencats'
781 'section' =>
'rendering/advancedrendering',
782 'label-message' =>
'tog-numberheadings',
792 # # Editing #####################################
795 'section' =>
'editing/advancedediting',
796 'label-message' =>
'tog-editsectiononrightclick',
800 'section' =>
'editing/advancedediting',
801 'label-message' =>
'tog-editondblclick',
804 if ( $context->
getConfig()->get(
'AllowUserCssPrefs' ) ) {
807 'section' =>
'editing/editor',
808 'label-message' =>
'editfont-style',
810 $context->
msg(
'editfont-default' )->text() =>
'default',
811 $context->
msg(
'editfont-monospace' )->text() =>
'monospace',
812 $context->
msg(
'editfont-sansserif' )->text() =>
'sans-serif',
813 $context->
msg(
'editfont-serif' )->text() =>
'serif',
819 'label-message' =>
'columns',
820 'section' =>
'editing/editor',
826 'label-message' =>
'rows',
827 'section' =>
'editing/editor',
831 if (
$user->isAllowed(
'minoredit' ) ) {
834 'section' =>
'editing/editor',
835 'label-message' =>
'tog-minordefault',
840 'section' =>
'editing/editor',
841 'label-message' =>
'tog-forceeditsummary',
845 'section' =>
'editing/editor',
846 'label-message' =>
'tog-useeditwarning',
850 'section' =>
'editing/editor',
851 'label-message' =>
'tog-showtoolbar',
856 'section' =>
'editing/preview',
857 'label-message' =>
'tog-previewonfirst',
861 'section' =>
'editing/preview',
862 'label-message' =>
'tog-previewontop',
866 'section' =>
'editing/preview',
867 'label-message' =>
'tog-uselivepreview',
879 $rcMaxAge = $config->get(
'RCMaxAge' );
880 # # RecentChanges #####################################
883 'label-message' =>
'recentchangesdays',
884 'section' =>
'rc/displayrc',
886 'max' => ceil( $rcMaxAge / ( 3600 * 24 ) ),
887 'help' => $context->
msg(
'recentchangesdays-max' )->numParams(
888 ceil( $rcMaxAge / ( 3600 * 24 ) ) )->escaped()
892 'label-message' =>
'recentchangescount',
893 'help-message' =>
'prefs-help-recentchangescount',
894 'section' =>
'rc/displayrc',
898 'label-message' =>
'tog-usenewrc',
899 'section' =>
'rc/advancedrc',
903 'label-message' =>
'tog-hideminor',
904 'section' =>
'rc/advancedrc',
907 if ( $config->get(
'RCWatchCategoryMembership' ) ) {
910 'label-message' =>
'tog-hidecategorization',
911 'section' =>
'rc/advancedrc',
915 if (
$user->useRCPatrol() ) {
918 'section' =>
'rc/advancedrc',
919 'label-message' =>
'tog-hidepatrolled',
923 if (
$user->useNPPatrol() ) {
926 'section' =>
'rc/advancedrc',
927 'label-message' =>
'tog-newpageshidepatrolled',
931 if ( $config->get(
'RCShowWatchingUsers' ) ) {
934 'section' =>
'rc/advancedrc',
935 'label-message' =>
'tog-shownumberswatching',
947 $watchlistdaysMax = ceil( $config->get(
'RCMaxAge' ) / ( 3600 * 24 ) );
949 # # Watchlist #####################################
950 if (
$user->isAllowed(
'editmywatchlist' ) ) {
951 $editWatchlistLinks = [];
952 $editWatchlistModes = [
953 'edit' => [
'EditWatchlist',
false ],
954 'raw' => [
'EditWatchlist',
'raw' ],
955 'clear' => [
'EditWatchlist',
'clear' ],
957 foreach ( $editWatchlistModes
as $editWatchlistMode => $mode ) {
961 $context->
msg(
"prefs-editwatchlist-{$editWatchlistMode}" )->parse()
968 'default' => $context->
getLanguage()->pipeList( $editWatchlistLinks ),
969 'label-message' =>
'prefs-editwatchlist-label',
970 'section' =>
'watchlist/editwatchlist',
977 'max' => $watchlistdaysMax,
978 'section' =>
'watchlist/displaywatchlist',
979 'help' => $context->
msg(
'prefs-watchlist-days-max' )->numParams(
980 $watchlistdaysMax )->escaped(),
981 'label-message' =>
'prefs-watchlist-days',
987 'label-message' =>
'prefs-watchlist-edits',
988 'help' => $context->
msg(
'prefs-watchlist-edits-max' )->escaped(),
989 'section' =>
'watchlist/displaywatchlist',
993 'section' =>
'watchlist/advancedwatchlist',
994 'label-message' =>
'tog-extendwatchlist',
998 'section' =>
'watchlist/advancedwatchlist',
999 'label-message' =>
'tog-watchlisthideminor',
1003 'section' =>
'watchlist/advancedwatchlist',
1004 'label-message' =>
'tog-watchlisthidebots',
1008 'section' =>
'watchlist/advancedwatchlist',
1009 'label-message' =>
'tog-watchlisthideown',
1013 'section' =>
'watchlist/advancedwatchlist',
1014 'label-message' =>
'tog-watchlisthideanons',
1018 'section' =>
'watchlist/advancedwatchlist',
1019 'label-message' =>
'tog-watchlisthideliu',
1023 'section' =>
'watchlist/advancedwatchlist',
1024 'label-message' =>
'tog-watchlistreloadautomatically',
1027 if ( $config->get(
'RCWatchCategoryMembership' ) ) {
1030 'section' =>
'watchlist/advancedwatchlist',
1031 'label-message' =>
'tog-watchlisthidecategorization',
1035 if (
$user->useRCPatrol() ) {
1038 'section' =>
'watchlist/advancedwatchlist',
1039 'label-message' =>
'tog-watchlisthidepatrolled',
1044 'edit' =>
'watchdefault',
1045 'move' =>
'watchmoves',
1046 'delete' =>
'watchdeletion'
1050 if (
$user->isAllowed(
'createpage' ) ||
$user->isAllowed(
'createtalk' ) ) {
1051 $watchTypes[
'read'] =
'watchcreations';
1054 if (
$user->isAllowed(
'rollback' ) ) {
1055 $watchTypes[
'rollback'] =
'watchrollback';
1058 if (
$user->isAllowed(
'upload' ) ) {
1059 $watchTypes[
'upload'] =
'watchuploads';
1062 foreach ( $watchTypes
as $action => $pref ) {
1063 if (
$user->isAllowed( $action ) ) {
1069 'section' =>
'watchlist/advancedwatchlist',
1070 'label-message' =>
"tog-$pref",
1075 if ( $config->get(
'EnableAPI' ) ) {
1081 'section' =>
'watchlist/tokenwatchlist',
1082 'label-message' =>
'prefs-watchlist-token',
1083 'default' =>
$user->getTokenFromOption(
'watchlisttoken' ),
1084 'help-message' =>
'prefs-help-watchlist-token2',
1117 $previewtext = $context->
msg(
'skin-preview' )->escaped();
1119 # Only show skins that aren't disabled in $wgSkipSkins
1122 # Sort by UI skin name. First though need to update validSkinNames as sometimes
1123 # the skinkey & UI skinname differ (e.g. "standard" skinkey is "Classic" in the UI).
1124 foreach ( $validSkinNames
as $skinkey => &$skinname ) {
1125 $msg = $context->
msg(
"skinname-{$skinkey}" );
1126 if ( $msg->exists() ) {
1127 $skinname = htmlspecialchars( $msg->text() );
1130 asort( $validSkinNames );
1133 $defaultSkin = $config->get(
'DefaultSkin' );
1134 $allowUserCss = $config->get(
'AllowUserCss' );
1135 $allowUserJs = $config->get(
'AllowUserJs' );
1137 $foundDefault =
false;
1138 foreach ( $validSkinNames
as $skinkey => $sn ) {
1141 # Mark the default skin
1142 if ( strcasecmp( $skinkey, $defaultSkin ) === 0 ) {
1143 $linkTools[] = $context->
msg(
'default' )->escaped();
1144 $foundDefault =
true;
1147 # Create preview link
1148 $mplink = htmlspecialchars( $mptitle->getLocalURL( [
'useskin' => $skinkey ] ) );
1149 $linkTools[] =
"<a target='_blank' href=\"$mplink\">$previewtext</a>";
1151 # Create links to user CSS/JS pages
1152 if ( $allowUserCss ) {
1154 $linkTools[] =
Linker::link( $cssPage, $context->
msg(
'prefs-custom-css' )->escaped() );
1157 if ( $allowUserJs ) {
1159 $linkTools[] =
Linker::link( $jsPage, $context->
msg(
'prefs-custom-js' )->escaped() );
1162 $display = $sn .
' ' . $context->
msg(
'parentheses' )
1163 ->rawParams( $context->
getLanguage()->pipeList( $linkTools ) )
1165 $ret[$display] = $skinkey;
1168 if ( !$foundDefault ) {
1183 $dateopts =
$lang->getDatePreferences();
1188 if ( !in_array(
'default', $dateopts ) ) {
1189 $dateopts[] =
'default';
1195 if ( !in_array( $wgDefaultUserOptions[
'date'], $dateopts ) ) {
1196 $wgDefaultUserOptions[
'date'] =
'default';
1200 foreach ( $dateopts
as $key ) {
1201 if ( $key ==
'default' ) {
1202 $formatted = $context->
msg(
'datedefault' )->escaped();
1204 $formatted = htmlspecialchars(
$lang->timeanddate( $epoch,
false, $key ) );
1206 $ret[$formatted] = $key;
1218 $pixels = $context->
msg(
'unit-pixel' )->text();
1220 foreach ( $context->
getConfig()->get(
'ImageLimits' )
as $index => $limits ) {
1221 $display =
"{$limits[0]}×{$limits[1]}" . $pixels;
1222 $ret[$display] = $index;
1234 $pixels = $context->
msg(
'unit-pixel' )->text();
1236 foreach ( $context->
getConfig()->get(
'ThumbLimits' )
as $index => $size ) {
1237 $display = $size . $pixels;
1238 $ret[$display] = $index;
1252 $maxSigChars = $form->getConfig()->get(
'MaxSigChars' );
1253 if ( mb_strlen( $signature ) > $maxSigChars ) {
1255 $form->msg(
'badsiglength' )->numParams( $maxSigChars )->text() );
1256 } elseif ( isset( $alldata[
'fancysig'] ) &&
1257 $alldata[
'fancysig'] &&
1258 $wgParser->validateSig( $signature ) ===
false
1262 [
'class' =>
'error' ],
1263 $form->msg(
'badsig' )->text()
1277 if ( isset( $alldata[
'fancysig'] ) && $alldata[
'fancysig'] ) {
1279 $signature = $wgParser->cleanSig( $signature );
1298 $formClass =
'PreferencesForm',
1302 if ( count( $remove ) ) {
1303 $removeKeys = array_flip( $remove );
1304 $formDescriptor = array_diff_key( $formDescriptor, $removeKeys );
1308 foreach ( $formDescriptor
as $name => $info ) {
1309 if ( isset( $info[
'type'] ) && $info[
'type'] ===
'api' ) {
1310 unset( $formDescriptor[
$name] );
1317 $htmlForm =
new $formClass( $formDescriptor, $context,
'prefs' );
1319 $htmlForm->setModifiedUser(
$user );
1320 $htmlForm->setId(
'mw-prefs-form' );
1321 $htmlForm->setAutocomplete(
'off' );
1322 $htmlForm->setSubmitText( $context->
msg(
'saveprefs' )->text() );
1323 # Used message keys: 'accesskey-preferences-save', 'tooltip-preferences-save'
1324 $htmlForm->setSubmitTooltip(
'preferences-save' );
1325 $htmlForm->setSubmitID(
'prefsubmit' );
1326 $htmlForm->setSubmitCallback( [
'Preferences',
'tryFormSubmit' ] );
1338 $localTZoffset = $context->
getConfig()->get(
'LocalTZoffset' );
1339 $timeZoneList = self::getTimeZoneList( $context->
getLanguage() );
1343 if ( $localTZoffset == $timestamp->format(
'Z' ) / 60 ) {
1344 $timezoneName = $timestamp->getTimezone()->getName();
1346 if ( isset( $timeZoneList[$timezoneName] ) ) {
1347 $timezoneName = $timeZoneList[$timezoneName][
'name'];
1349 $server_tz_msg = $context->
msg(
1350 'timezoneuseserverdefault',
1354 $tzstring = sprintf(
1356 floor( $localTZoffset / 60 ),
1357 abs( $localTZoffset ) % 60
1359 $server_tz_msg = $context->
msg(
'timezoneuseserverdefault', $tzstring )->text();
1361 $opt[$server_tz_msg] =
"System|$localTZoffset";
1362 $opt[$context->
msg(
'timezoneuseoffset' )->text()] =
'other';
1363 $opt[$context->
msg(
'guesstimezone' )->text()] =
'guess';
1365 foreach ( $timeZoneList
as $timeZoneInfo ) {
1366 $region = $timeZoneInfo[
'region'];
1367 if ( !isset( $opt[$region] ) ) {
1370 $opt[$region][$timeZoneInfo[
'name']] = $timeZoneInfo[
'timecorrection'];
1390 $data = explode(
'|', $tz, 3 );
1391 switch ( $data[0] ) {
1396 $data = explode(
':', $tz, 2 );
1397 if ( count( $data ) == 2 ) {
1398 $data[0] = intval( $data[0] );
1399 $data[1] = intval( $data[1] );
1400 $minDiff = abs( $data[0] ) * 60 + $data[1];
1401 if ( $data[0] < 0 ) {
1402 $minDiff = - $minDiff;
1405 $minDiff = intval( $data[0] ) * 60;
1408 # Max is +14:00 and min is -12:00, see:
1409 # https://en.wikipedia.org/wiki/Timezone
1410 $minDiff = min( $minDiff, 840 ); # 14:00
1411 $minDiff = max( $minDiff, - 720 ); # -12:00
1412 return 'Offset|' . $minDiff;
1424 $user = $form->getModifiedUser();
1425 $hiddenPrefs = $form->getConfig()->get(
'HiddenPrefs' );
1428 if ( !
$user->isAllowedAny(
'editmyprivateinfo',
'editmyoptions' ) ) {
1433 foreach ( array_keys( $formData )
as $name ) {
1434 if ( isset( self::$saveFilters[$name] ) ) {
1436 call_user_func( self::$saveFilters[$name], $formData[$name], $formData );
1443 if ( !in_array(
'realname', $hiddenPrefs )
1444 &&
$user->isAllowed(
'editmyprivateinfo' )
1445 && array_key_exists(
'realname', $formData )
1447 $realName = $formData[
'realname'];
1448 $user->setRealName( $realName );
1451 if (
$user->isAllowed(
'editmyoptions' ) ) {
1452 foreach ( self::$saveBlacklist
as $b ) {
1453 unset( $formData[$b] );
1456 # If users have saved a value for a preference which has subsequently been disabled
1457 # via $wgHiddenPrefs, we don't want to destroy that setting in case the preference
1458 # is subsequently re-enabled
1459 foreach ( $hiddenPrefs
as $pref ) {
1460 # If the user has not set a non-default value here, the default will be returned
1461 # and subsequently discarded
1462 $formData[$pref] =
$user->getOption( $pref, null,
true );
1466 $user->resetOptions(
'unused', $form->getContext() );
1468 foreach ( $formData
as $key =>
$value ) {
1476 $user->saveSettings();
1487 $res = self::tryFormSubmit( $formData, $form );
1492 if (
$res ===
'eauth' ) {
1493 $urlOptions[
'eauth'] = 1;
1496 $urlOptions += $form->getExtraSuccessRedirectParameters();
1498 $url = $form->getTitle()->getFullURL( $urlOptions );
1502 $context->getRequest()->setSessionData(
'specialPreferencesSaveSuccess', 1 );
1504 $context->getOutput()->redirect( $url );
1519 $identifiers = DateTimeZone::listIdentifiers();
1520 if ( $identifiers ===
false ) {
1523 sort( $identifiers );
1526 'Africa' =>
wfMessage(
'timezoneregion-africa' )->inLanguage( $language )->text(),
1527 'America' =>
wfMessage(
'timezoneregion-america' )->inLanguage( $language )->text(),
1528 'Antarctica' =>
wfMessage(
'timezoneregion-antarctica' )->inLanguage( $language )->text(),
1529 'Arctic' =>
wfMessage(
'timezoneregion-arctic' )->inLanguage( $language )->text(),
1530 'Asia' =>
wfMessage(
'timezoneregion-asia' )->inLanguage( $language )->text(),
1531 'Atlantic' =>
wfMessage(
'timezoneregion-atlantic' )->inLanguage( $language )->text(),
1532 'Australia' =>
wfMessage(
'timezoneregion-australia' )->inLanguage( $language )->text(),
1533 'Europe' =>
wfMessage(
'timezoneregion-europe' )->inLanguage( $language )->text(),
1534 'Indian' =>
wfMessage(
'timezoneregion-indian' )->inLanguage( $language )->text(),
1535 'Pacific' =>
wfMessage(
'timezoneregion-pacific' )->inLanguage( $language )->text(),
1537 asort( $tzRegions );
1541 $now =
new DateTime();
1543 foreach ( $identifiers
as $identifier ) {
1544 $parts = explode(
'/', $identifier, 2 );
1549 if ( count( $parts ) !== 2 || !array_key_exists( $parts[0], $tzRegions ) ) {
1554 $parts[0] = $tzRegions[$parts[0]];
1556 $dateTimeZone =
new DateTimeZone( $identifier );
1557 $minDiff = floor( $dateTimeZone->getOffset( $now ) / 60 );
1559 $display = str_replace(
'_',
' ', $parts[0] .
'/' . $parts[1] );
1560 $value =
"ZoneInfo|$minDiff|$identifier";
1562 $timeZoneList[$identifier] = [
1564 'timecorrection' =>
$value,
1565 'region' => $parts[0],
1569 return $timeZoneList;
1584 $this->modifiedUser =
$user;
1591 if ( $this->modifiedUser === null ) {
1615 return parent::wrapForm(
$html );
1623 $attrs = [
'id' =>
'mw-prefs-restoreprefs' ];
1625 if ( !$this->
getModifiedUser()->isAllowedAny(
'editmyprivateinfo',
'editmyoptions' ) ) {
1629 $html = parent::getButtons();
1650 foreach ( $this->mFlatFields
as $fieldname => $field ) {
1652 $info = $field->mParams;
1653 $prefix = isset( $info[
'prefix'] ) ? $info[
'prefix'] : $fieldname;
1654 foreach ( $field->filterDataForSubmit( $data[$fieldname] )
as $key =>
$value ) {
1655 $data[
"$prefix$key"] =
$value;
1657 unset( $data[$fieldname] );
1669 return $this->
displaySection( $this->mFieldTree,
'',
'mw-prefsection-' );
1679 $legend = parent::getLegend( $key );
1680 Hooks::run(
'PreferencesGetLegend', [ $this, $key, &$legend ] );
1689 return array_keys( array_filter( $this->mFieldTree,
'is_array' ) );
static array $saveFilters
static newFromContext(IContextSource $context)
Get a ParserOptions object from a IContextSource object.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
Interface for objects which can provide a MediaWiki context on request.
the array() calling protocol came about after MediaWiki 1.4rc1.
wfCanIPUseHTTPS($ip)
Determine whether the client at a given source IP is likely to be able to access the wiki via HTTPS...
static getImageSizes(IContextSource $context)
$wgDefaultUserOptions
Settings added to this array will override the default globals for the user preferences used by anony...
static element($element, $attribs=null, $contents= '', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
static filterTimezoneInput($tz, $alldata)
processing should stop and the error should be shown to the user * false
static newMainPage()
Create a new Title for the Main Page.
static skinPreferences($user, IContextSource $context, &$defaultPreferences)
static rcPreferences($user, IContextSource $context, &$defaultPreferences)
static validateSignature($signature, $alldata, $form)
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
static getTitleFor($name, $subpage=false, $fragment= '')
Get a localised Title object for a specified special page name.
msg()
Get a Message object with context set.
static editingPreferences($user, IContextSource $context, &$defaultPreferences)
if(!isset($args[0])) $lang
static loadPreferenceValues($user, $context, &$defaultPreferences)
Loads existing values for a given array of preferences.
static hidden($name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
static array $defaultPreferences
static array static $saveBlacklist
static getDateOptions(IContextSource $context)
static filesPreferences($user, IContextSource $context, &$defaultPreferences)
static miscPreferences($user, IContextSource $context, &$defaultPreferences)
Dummy, kept for backwards-compatibility.
$wgAuth $wgAuth
Authentication plugin.
when a variable name is used in a it is silently declared as a new local masking the global
static getPreferences($user, IContextSource $context)
static newFatal($message)
Factory function for fatal errors.
static generateSkinOptions($user, IContextSource $context)
static makeGroupLinkHTML($group, $text= '')
Create a link to the group in HTML, if available; else return the group name.
see documentation in includes Linker php for Linker::makeImageLink & $time
static fetchLanguageNames($inLanguage=null, $include= 'mw')
Get an array of language names, indexed by code.
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message.Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item.Return false to stop further processing of the tag $reader:XMLReader object $logInfo:Array of information 'ImportHandlePageXMLTag':When parsing a XML tag in a page.Return false to stop further processing of the tag $reader:XMLReader object &$pageInfo:Array of information 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision.Return false to stop further processing of the tag $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information 'ImportHandleToplevelXMLTag':When parsing a top level XML tag.Return false to stop further processing of the tag $reader:XMLReader object 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload.Return false to stop further processing of the tag $reader:XMLReader object $revisionInfo:Array of information 'ImportLogInterwikiLink':Hook to change the interwiki link used in log entries and edit summaries for transwiki imports.&$fullInterwikiPrefix:Interwiki prefix, may contain colons.&$pageTitle:String that contains page title. 'ImportSources':Called when reading from the $wgImportSources configuration variable.Can be used to lazy-load the import sources list.&$importSources:The value of $wgImportSources.Modify as necessary.See the comment in DefaultSettings.php for the detail of how to structure this array. 'InfoAction':When building information to display on the action=info page.$context:IContextSource object &$pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect.&$title:Title object for the current page &$request:WebRequest &$ignoreRedirect:boolean to skip redirect check &$target:Title/string of redirect target &$article:Article object 'InternalParseBeforeLinks':during Parser's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings.&$parser:Parser object &$text:string containing partially parsed text &$stripState:Parser's internal StripState object 'InternalParseBeforeSanitize':during Parser's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings.Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments.&$parser:Parser object &$text:string containing partially parsed text &$stripState:Parser's internal StripState object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not.Return true without providing an interwiki to continue interwiki search.$prefix:interwiki prefix we are looking for.&$iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InvalidateEmailComplete':Called after a user's email has been invalidated successfully.$user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification.Callee may modify $url and $query, URL will be constructed as $url.$query &$url:URL to index.php &$query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) &$article:article(object) being checked 'IsTrustedProxy':Override the result of IP::isTrustedProxy() &$ip:IP being check &$result:Change this value to override the result of IP::isTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from &$allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of Sanitizer::validateEmail(), for instance to return false if the domain name doesn't match your organization.$addr:The e-mail address entered by the user &$result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user &$result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we're looking for a messages file for &$file:The messages file path, you can override this to change the location. 'LanguageGetMagic':DEPRECATED!Use $magicWords in a file listed in $wgExtensionMessagesFiles instead.Use this to define synonyms of magic words depending of the language &$magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces.Do not use this hook to add namespaces.Use CanonicalNamespaces for that.&$namespaces:Array of namespaces indexed by their numbers 'LanguageGetSpecialPageAliases':DEPRECATED!Use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead.Use to define aliases of special pages names depending of the language &$specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names.&$names:array of language code=> language name $code:language of the preferred translations 'LanguageLinks':Manipulate a page's language links.This is called in various places to allow extensions to define the effective language links for a page.$title:The page's Title.&$links:Associative array mapping language codes to prefixed links of the form"language:title".&$linkFlags:Associative array mapping prefixed links to arrays of flags.Currently unused, but planned to provide support for marking individual language links in the UI, e.g.for featured articles. 'LanguageSelector':Hook to change the language selector available on a page.$out:The output page.$cssClassName:CSS class name of the language selector. 'LinkBegin':DEPRECATED!Use HtmlPageLinkRendererBegin instead.Used when generating internal and interwiki links in Linker::link(), before processing starts.Return false to skip default processing and return $ret.See documentation for Linker::link() for details on the expected meanings of parameters.$skin:the Skin object $target:the Title that the link is pointing to &$html:the contents that the< a > tag should have(raw HTML) $result
the value to return A Title object or null for latest to be modified or replaced by the hook handler or if authentication is not possible after cache objects are set for highlighting & $link
static getLocalInstance($ts=false)
Get a timestamp instance in the server local timezone ($wgLocaltimezone)
static getTimeZoneList(Language $language)
Get a list of all time zones.
getUser()
Get the User object.
msg()
Get a Message object with context set Parameters are the same as wfMessage()
getConfig()
Get the site configuration.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content as context as context $options
static searchPreferences($user, IContextSource $context, &$defaultPreferences)
switch($options['output']) $languages
static getSaveBlacklist()
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
Internationalisation code.
static getFormObject($user, IContextSource $context, $formClass= 'PreferencesForm', array $remove=[])
static makeTitleSafe($ns, $title, $fragment= '', $interwiki= '')
Create a new Title from a namespace index and a DB key.
static watchlistPreferences($user, IContextSource $context, &$defaultPreferences)
static datetimePreferences($user, IContextSource $context, &$defaultPreferences)
static renderingPreferences($user, IContextSource $context, &$defaultPreferences)
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned after processing after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock()-offset Set to overwrite offset parameter in $wgRequest set to ''to unsetoffset-wrap String Wrap the message in html(usually something like"<
wfBCP47($code)
Get the normalised IETF language tag See unit test for examples.
static linkKnown($target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
static run($event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
getLanguage()
Get the Language object.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable & $code
static filterIntval($value, $alldata)
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
static link($target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
static getGroupName($group)
Get the localized descriptive name for a group, if it exists.
static tryFormSubmit($formData, $form)
Handle the form submission if everything validated properly.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static tags($element, $attribs=null, $contents)
Same as Xml::element(), but does not escape contents.
static getGroupMember($group, $username= '#')
Get the localized descriptive name for a member of a group, if it exists.
static profilePreferences($user, IContextSource $context, &$defaultPreferences)
static buttonAttributes(array $attrs, array $modifiers=[])
Modifies a set of attributes meant for button elements and apply a set of default attributes when $wg...
$wgDisableAuthManager
Disable AuthManager.
getTitle()
Get the Title object.
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang
static cleanSigInSig($text)
Strip 3, 4 or 5 tildes out of signatures.
getOutput()
Get the OutputPage object.
static cleanSignature($signature, $alldata, $form)
static getTimezoneOptions(IContextSource $context)
We're now using the HTMLForm object with some customisation to generate the Preferences form...
static getThumbSizes(IContextSource $context)
static getDefaultOptions()
Combine the language default options with any site-specific options and add the default language vari...
static array $languagesWithVariants
languages supporting variants
static getValidNamespaces()
Returns an array of the namespaces (by integer id) that exist on the wiki.
static tryUISubmit($formData, $form)
static getAllowedSkins()
Fetch the list of user-selectable skins in regards to $wgSkipSkins.
getUser()
Get the User object.
getRequest()
Get the WebRequest object.
static newGood($value=null)
Factory function for good results.
static getOptionFromUser($name, $info, $user)
Pull option from a user account.
Allows to change the fields on the form that will be generated $name