Go to the documentation of this file.
33 parent::__construct(
'ResetTokens' );
45 if ( !isset( $this->tokensList ) ) {
47 array(
'preference' =>
'watchlisttoken',
'label-message' =>
'resettokens-watchlist-token' ),
51 $tokens = array_filter( $tokens,
function ( $tok ) use ( $wgHiddenPrefs ) {
52 return !in_array( $tok[
'preference'], $wgHiddenPrefs );
55 $this->tokensList = $tokens;
73 "<div class='successbox'>\n$1\n</div>",
87 $tokensForForm =
array();
88 foreach ( $tokens
as $tok ) {
89 $label = $this->
msg(
'resettokens-token-label' )
90 ->rawParams( $this->
msg( $tok[
'label-message'] )->parse() )
91 ->params(
$user->getTokenFromOption( $tok[
'preference'] ) )
93 $tokensForForm[$label] = $tok[
'preference'];
97 'label-message' =>
'resettokens-tokens',
98 'type' =>
'multiselect',
99 'options' => $tokensForForm,
103 'label-message' =>
'resettokens-no-tokens',
121 $form->suppressDefaultSubmit();
126 if ( $formData[
'tokens'] ) {
128 foreach ( $formData[
'tokens']
as $tokenPref ) {
129 $user->resetTokenFromOption( $tokenPref );
131 $user->saveSettings();
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
getTokensList()
Returns the token information list for this page after running the hook and filtering out disabled pr...
getOutput()
Get the OutputPage being used for this instance.
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead $form
Special page which uses an HTMLForm to handle processing.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
requireLogin( $reasonMsg=null, $titleMsg=null)
If the user is not logged in, throws UserNotLoggedIn error.
getFormFields()
Display appropriate message if there's nothing to do.
execute( $par)
Basic SpecialPage workflow: get a form, send it to the user; get some data back,.
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
getUser()
Shortcut to get the User executing this instance.
when a variable name is used in a it is silently declared as a new masking the global
msg()
Wrapper around wfMessage that sets the current context.
onSuccess()
Do something exciting on successful processing of the form, most likely to show a confirmation messag...
string $par
The sub-page of the special page.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
alterForm(HTMLForm $form)
Suppress the submit button if there's nothing to do; provide additional message on it otherwise.
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 account $user
isListed()
Whether this special page is listed in Special:SpecialPages.
Let users reset tokens like the watchlist token.
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
onSubmit(array $formData)
Process the form on POST submission.