MediaWiki REL1_28
SpecialPage Class Reference

Parent class for all special pages. More...

Inheritance diagram for SpecialPage:
Collaboration diagram for SpecialPage:

Public Member Functions

 __construct ( $name='', $restriction='', $listed=true, $function=false, $file='', $includable=false)
 Default constructor for special pages Derivative classes should call this from their constructor Note that if the user does not have the required level, an error message will be displayed by the default execute() method, without the global function ever being called.
 
 addHelpLink ( $to, $overrideBaseUrl=false)
 Adds help link with an icon via page indicators.
 
 checkPermissions ()
 Checks if userCanExecute, and if not throws a PermissionsError.
 
 checkReadOnly ()
 If the wiki is currently in readonly mode, throws a ReadOnlyError.
 
 displayRestrictionError ()
 Output an error message telling the user what access level they have to have.
 
 doesWrites ()
 Indicates whether this special page may perform database writes.
 
 execute ( $subPage)
 Default execute method Checks user permissions.
 
 getConfig ()
 Shortcut to get main config object.
 
 getContext ()
 Gets the context this SpecialPage is executed in.
 
 getDescription ()
 Returns the name that goes in the \<h1\> in the special page itself, and also the name that will be listed in Special:Specialpages.
 
 getFinalGroupName ()
 Get the group that the special page belongs in on Special:SpecialPage Use this method, instead of getGroupName to allow customization of the group name from the wiki side.
 
 getFullTitle ()
 Return the full title, including $par.
 
 getLanguage ()
 Shortcut to get user's language.
 
 getLinkRenderer ()
 
 getLocalName ()
 Get the localised name of the special page.
 
 getName ()
 Get the name of this Special Page.
 
 getOutput ()
 Get the OutputPage being used for this instance.
 
 getPageTitle ( $subpage=false)
 Get a self-referential title object.
 
 getRequest ()
 Get the WebRequest being used for this instance.
 
 getRestriction ()
 Get the permission that a user must have to execute this page.
 
 getSkin ()
 Shortcut to get the skin being used for this instance.
 
 getTitle ( $subpage=false)
 Get a self-referential title object.
 
 getUser ()
 Shortcut to get the User executing this instance.
 
 including ( $x=null)
 Whether the special page is being evaluated via transclusion.
 
 isCached ()
 Is this page cached? Expensive pages are cached or disabled in miser mode.
 
 isExpensive ()
 Is this page expensive (for some definition of expensive)? Expensive pages are disabled or cached in miser mode.
 
 isIncludable ()
 Whether it's allowed to transclude the special page via {{Special:Foo/params}}.
 
 isListed ()
 Whether this special page is listed in Special:SpecialPages.
 
 isRestricted ()
 Can be overridden by subclasses with more complicated permissions schemes.
 
 listed ( $x=null)
 Get or set whether this special page is listed in Special:SpecialPages.
 
 maxIncludeCacheTime ()
 How long to cache page when it is being included.
 
 msg ()
 Wrapper around wfMessage that sets the current context.
 
 outputHeader ( $summaryMessageKey='')
 Outputs a summary message on top of special pages Per default the message key is the canonical name of the special page May be overridden, i.e.
 
 prefixSearchSubpages ( $search, $limit, $offset)
 Return an array of subpages beginning with $search that this special page will accept.
 
 requireLogin ( $reasonMsg='exception-nologin-text', $titleMsg='exception-nologin')
 If the user is not logged in, throws UserNotLoggedIn error.
 
 run ( $subPage)
 Entry point.
 
 setContext ( $context)
 Sets the context this SpecialPage is executed in.
 
 setHeaders ()
 Sets headers - this should be called from the execute() method of all derived classes!
 
 setLinkRenderer (LinkRenderer $linkRenderer)
 
 setListed ( $listed)
 Set whether this page is listed in Special:Specialpages, at run-time.
 
 userCanExecute (User $user)
 Checks if the given user (identified by an object) can execute this special page (as defined by $mRestriction).
 

Static Public Member Functions

static getSafeTitleFor ( $name, $subpage=false)
 Get a localised Title object for a page name with a possibly unvalidated subpage.
 
static getTitleFor ( $name, $subpage=false, $fragment='')
 Get a localised Title object for a specified special page name If you don't need a full Title object, consider using TitleValue through getTitleValueFor() below.
 
static getTitleValueFor ( $name, $subpage=false, $fragment='')
 Get a localised TitleValue object for a specified special page name.
 

Protected Member Functions

 addFeedLinks ( $params)
 Adds RSS/atom links.
 
 afterExecute ( $subPage)
 Gets called after.
 
 beforeExecute ( $subPage)
 Gets called before.
 
 checkLoginSecurityLevel ( $level=null)
 Verifies that the user meets the security level, possibly reauthenticating them in the process.
 
 getCacheTTL ()
 
 getGroupName ()
 Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.
 
 getLoginSecurityLevel ()
 Tells if the special page does something security-sensitive and needs extra defense against a stolen account (e.g.
 
 getRobotPolicy ()
 Return the robot policy.
 
 getSubpagesForPrefixSearch ()
 Return an array of subpages that this special page will accept for prefix searches.
 
 prefixSearchString ( $search, $limit, $offset)
 Perform a regular substring search for prefixSearchSubpages.
 
 useTransactionalTimeLimit ()
 Call wfTransactionalTimeLimit() if this request was POSTed.
 

Static Protected Member Functions

static prefixSearchArray ( $search, $limit, array $subpages, $offset)
 Helper function for implementations of prefixSearchSubpages() that filter the values in memory (as opposed to making a query).
 

Protected Attributes

IContextSource $mContext
 Current request context.
 
 $mIncludable
 
 $mIncluding
 
 $mName
 
 $mRestriction
 

Private Attributes

MediaWiki Linker LinkRenderer null $linkRenderer
 
 $mListed
 
 $mLocalName
 

Detailed Description

Parent class for all special pages.

Includes some static functions for handling the special page list deprecated in favor of SpecialPageFactory.

Definition at line 36 of file SpecialPage.php.

Constructor & Destructor Documentation

◆ __construct()

SpecialPage::__construct (   $name = '',
  $restriction = '',
  $listed = true,
  $function = false,
  $file = '',
  $includable = false 
)

Default constructor for special pages Derivative classes should call this from their constructor Note that if the user does not have the required level, an error message will be displayed by the default execute() method, without the global function ever being called.

If you override execute(), you can recover the default behavior with userCanExecute() and displayRestrictionError()

Parameters
string$nameName of the special page, as seen in links and URLs
string$restrictionUser right required, e.g. "block" or "delete"
bool$listedWhether the page is listed in Special:Specialpages
callable | bool$functionUnused
string$fileUnused
bool$includableWhether the page can be included in normal pages

Definition at line 136 of file SpecialPage.php.

References $name.

Member Function Documentation

◆ addFeedLinks()

SpecialPage::addFeedLinks (   $params)
protected

Adds RSS/atom links.

Parameters
array$params

Definition at line 767 of file SpecialPage.php.

References $params, as, getConfig(), getOutput(), wfAppendQuery(), and wfScript().

Referenced by SpecialContributions\execute(), SpecialRecentChanges\outputFeedLinks(), and SpecialWatchlist\outputFeedLinks().

◆ addHelpLink()

◆ afterExecute()

SpecialPage::afterExecute (   $subPage)
protected

Gets called after.

See also
SpecialPage::execute.
Since
1.20
Parameters
string | null$subPage

Reimplemented in SpecialCachedPage.

Definition at line 556 of file SpecialPage.php.

Referenced by run().

◆ beforeExecute()

SpecialPage::beforeExecute (   $subPage)
protected

Gets called before.

See also
SpecialPage::execute. Return false to prevent calling execute() (since 1.27+).
Since
1.20
Parameters
string | null$subPage
Returns
bool|void

Reimplemented in AuthManagerSpecialPage, LoginSignupSpecialPage, and SpecialUserLogin.

Definition at line 545 of file SpecialPage.php.

Referenced by run().

◆ checkLoginSecurityLevel()

SpecialPage::checkLoginSecurityLevel (   $level = null)
protected

Verifies that the user meets the security level, possibly reauthenticating them in the process.

This should be used when the page does something security-sensitive and needs extra defense against a stolen account (e.g. a reauthentication). The authentication framework will make an extra effort to make sure the user account is not compromised. What that exactly means will depend on the system and user settings; e.g. the user might be required to log in again unless their last login happened recently, or they might be given a second-factor challenge.

Calling this method will result in one if these actions:

  • return true: all good.
  • return false and set a redirect: caller should abort; the redirect will take the user to the login page for reauthentication, and back.
  • throw an exception if there is no way for the user to meet the requirements without using a different access method (e.g. this functionality is only available from a specific IP).

Note that this does not in any way check that the user is authorized to use this special page (use checkPermissions() for that).

Parameters
string$levelA security level. Can be an arbitrary string, defaults to the page name.
Returns
bool False means a redirect to the reauthentication page has been set and processing of the special page should be aborted.
Exceptions
ErrorPageErrorIf the security level cannot be met, even with reauthentication.

Definition at line 379 of file SpecialPage.php.

References $query, $request, $title, getFullTitle(), getName(), getOutput(), getRequest(), getTitleFor(), PROTO_HTTPS, wfArrayToCgi(), and wfMessage().

Referenced by SpecialChangeEmail\execute(), and execute().

◆ checkPermissions()

◆ checkReadOnly()

◆ displayRestrictionError()

SpecialPage::displayRestrictionError ( )

Output an error message telling the user what access level they have to have.

Exceptions
PermissionsError

Definition at line 295 of file SpecialPage.php.

Referenced by checkPermissions(), QueryPage\execute(), and DeletedContributionsPage\execute().

◆ doesWrites()

◆ execute()

SpecialPage::execute (   $subPage)

Default execute method Checks user permissions.

This must be overridden by subclasses; it will be made abstract in a future version

Parameters
string | null$subPage

Reimplemented in EmailConfirmation, EmailInvalidation, SpecialBookSources, SpecialEditWatchlist, FormSpecialPage, QueryPage, SpecialActiveUsers, SpecialAllMessages, SpecialAllPages, SpecialApiHelp, SpecialApiSandbox, SpecialBlankpage, SpecialBlockList, SpecialBotPasswords, SpecialCategories, SpecialChangeEmail, SpecialComparePages, SpecialContributions, DeletedContributionsPage, SpecialEditTags, SpecialEmailUser, SpecialExport, FileDuplicateSearchPage, SpecialGoToInterwiki, SpecialImport, SpecialJavaScriptTest, LinkSearchPage, SpecialListFiles, SpecialListGrants, SpecialListGroupRights, SpecialListUsers, SpecialLog, SpecialMergeHistory, MIMEsearchPage, MovePageForm, SpecialNewFiles, SpecialNewpages, SpecialPagesWithProp, SpecialPreferences, SpecialPrefixindex, SpecialProtectedpages, SpecialProtectedtitles, RandomPage, SpecialResetTokens, SpecialRevisionDelete, SpecialSearch, SpecialSpecialpages, SpecialStatistics, SpecialTags, SpecialTrackingCategories, SpecialUnblock, SpecialUndelete, UnwatchedpagesPage, SpecialUpload, SpecialUserLogout, UserrightsPage, SpecialVersion, WantedPagesPage, SpecialWhatLinksHere, WithoutInterwikiPage, SpecialRunJobs, ChangesListSpecialPage, LoginSignupSpecialPage, RedirectSpecialPage, SpecialChangeCredentials, SpecialExpandTemplates, SpecialLinkAccounts, SpecialRecentChanges, SpecialUnlinkAccounts, SpecialUploadStash, and SpecialWatchlist.

Definition at line 568 of file SpecialPage.php.

References checkLoginSecurityLevel(), checkPermissions(), getLoginSecurityLevel(), outputHeader(), and setHeaders().

◆ getCacheTTL()

SpecialPage::getCacheTTL ( )
protected
Returns
int Seconds that this page can be cached

Reimplemented in SpecialNewpages, and SpecialRecentChanges.

Definition at line 217 of file SpecialPage.php.

Referenced by maxIncludeCacheTime().

◆ getConfig()

SpecialPage::getConfig ( )

Shortcut to get main config object.

Returns
Config
Since
1.24

Definition at line 714 of file SpecialPage.php.

References getContext().

Referenced by SpecialPasswordReset\__construct(), addFeedLinks(), SpecialPasswordReset\alterForm(), SpecialNewFiles\buildForm(), ChangesListSpecialPage\buildMainQueryConds(), SpecialBotPasswords\checkExecutePermissions(), SpecialLockdb\checkExecutePermissions(), SpecialUnlockdb\checkExecutePermissions(), SpecialWatchlist\cutoffselector(), QueryPage\doFeed(), SpecialWatchlist\doHeader(), SpecialImport\doImport(), SpecialRecentChanges\doMainQuery(), SpecialWatchlist\doMainQuery(), MovePageForm\doSubmit(), SpecialTags\doTagRow(), QueryPage\execute(), SpecialActiveUsers\execute(), SpecialAllMessages\execute(), SpecialApiSandbox\execute(), DeletedContributionsPage\execute(), SpecialEmailUser\execute(), SpecialExport\execute(), SpecialImport\execute(), LinkSearchPage\execute(), SpecialListGrants\execute(), SpecialListGroupRights\execute(), SpecialLog\execute(), SpecialWhatLinksHere\execute(), SpecialRunJobs\execute(), SpecialExpandTemplates\execute(), SpecialWatchlist\execute(), SpecialNewpages\feed(), QueryPage\feedTitle(), SpecialNewpages\feedTitle(), UserrightsPage\fetchUser(), QueryPage\getDBLimit(), ChangesListSpecialPage\getDefaultOptions(), SpecialRecentChanges\getExtraOptions(), SpecialRecentChanges\getFeedQuery(), LoginSignupSpecialPage\getFieldDefinitions(), SpecialPageLanguage\getFormFields(), SpecialPasswordReset\getFormFields(), SpecialStatistics\getGroupStats(), SpecialProtectedpages\getLevelMenu(), SpecialProtectedtitles\getLevelMenu(), QueryPage\getLimitOffset(), SpecialImport\getMappingFormPart(), QueryPage\getMaxResults(), SpecialExport\getPagesFromCategory(), SpecialExport\getPagesFromNamespace(), SpecialStatistics\getPageStats(), LinkSearchPage\getQueryInfo(), UnusedimagesPage\getQueryInfo(), WantedPagesPage\getQueryInfo(), SpecialChangeCredentials\getRequestBlacklist(), SpecialLinkAccounts\getRequestBlacklist(), SpecialRemoveCredentials\getRequestBlacklist(), SpecialUnlinkAccounts\getRequestBlacklist(), SpecialLog\getSubpagesForPrefixSearch(), SpecialResetTokens\getTokensList(), SpecialStatistics\getUserStats(), SpecialSearch\goResult(), QueryPage\isCached(), QueryPage\isExpensive(), SpecialBotPasswords\isListed(), LinkSearchPage\linkParameters(), maxIncludeCacheTime(), SpecialPrefixindex\namespacePrefixForm(), SpecialLockdb\onSubmit(), SpecialPageLanguage\onSubmit(), SpecialUnlockdb\onSubmit(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialUploadStash\outputRemoteScaledThumb(), SpecialUploadStash\outputThumbFromStash(), SpecialLog\parseParams(), SpecialTrackingCategories\prepareTrackingCategoriesData(), SpecialUpload\processUpload(), SpecialUpload\processVerificationError(), SpecialBotPasswords\save(), setHeaders(), SpecialWatchlist\setTopText(), SpecialSearch\shouldRunSuggestedQuery(), MovePageForm\showForm(), SpecialImport\showForm(), SpecialUndelete\showHistory(), SpecialExpandTemplates\showHtmlPreview(), SpecialWhatLinksHere\showIndirectLinks(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUndelete\undelete(), and SpecialExport\validateLinkDepth().

◆ getContext()

SpecialPage::getContext ( )

Gets the context this SpecialPage is executed in.

Returns
IContextSource|RequestContext
Since
1.18

Definition at line 648 of file SpecialPage.php.

References $mContext, RequestContext\getMain(), and wfDebug().

Referenced by MergeHistoryPager\__construct(), SpecialBookSources\buildForm(), SpecialNewFiles\buildForm(), SpecialUndelete\diffHeader(), SpecialImport\doImport(), SpecialActiveUsers\execute(), SpecialApiHelp\execute(), SpecialBlockList\execute(), SpecialCategories\execute(), SpecialComparePages\execute(), SpecialContributions\execute(), DeletedContributionsPage\execute(), SpecialEmailUser\execute(), SpecialExport\execute(), FileDuplicateSearchPage\execute(), LinkSearchPage\execute(), SpecialListFiles\execute(), SpecialListUsers\execute(), SpecialNewFiles\execute(), SpecialPagesWithProp\execute(), SpecialPreferences\execute(), SpecialStatistics\execute(), SpecialUnblock\execute(), SpecialExpandTemplates\execute(), SpecialNewpages\form(), FewestrevisionsPage\formatResult(), MostcategoriesPage\formatResult(), MostinterwikisPage\formatResult(), MostlinkedPage\formatResult(), MostlinkedCategoriesPage\formatResult(), MostlinkedTemplatesPage\formatResult(), ShortPagesPage\formatResult(), UnwatchedpagesPage\formatResult(), PageQueryPage\formatResult(), SpecialProtectedtitles\formatRow(), SpecialExpandTemplates\generateHtml(), AuthManagerSpecialPage\getAuthForm(), LoginSignupSpecialPage\getAuthForm(), SpecialEditWatchlist\getClearForm(), getConfig(), SpecialUpload\getDupeWarning(), FormSpecialPage\getForm(), getFullTitle(), getLanguage(), SpecialEditTags\getList(), SpecialRevisionDelete\getList(), SpecialEditWatchlist\getNormalForm(), getOutput(), MIMEsearchPage\getPageHeader(), WithoutInterwikiPage\getPageHeader(), SpecialEditWatchlist\getRawForm(), AuthManagerSpecialPage\getRequest(), getRequest(), getSkin(), SpecialUpload\getUploadForm(), getUser(), SpecialExpandTemplates\makeForm(), ChangesListSpecialPage\makeLegend(), msg(), SpecialChangeContentModel\onSubmit(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), SpecialAllPages\outputHTMLForm(), ImageQueryPage\outputResults(), SpecialTags\processCreateTagForm(), AuthManagerSpecialPage\setRequest(), LoginSignupSpecialPage\setSessionUserForCurrentRequest(), SpecialLog\show(), SpecialTags\showActivateDeactivateForm(), SpecialAllPages\showChunk(), SpecialTags\showDeleteTagForm(), SpecialUndelete\showDiff(), SpecialUndelete\showList(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), LoginSignupSpecialPage\showReturnToPage(), LoginSignupSpecialPage\showSuccessPage(), SpecialTags\showTagList(), SpecialUploadStash\showUploads(), SpecialPreferences\submitReset(), and SpecialUserLogin\successfulAction().

◆ getDescription()

SpecialPage::getDescription ( )

Returns the name that goes in the \<h1\> in the special page itself, and also the name that will be listed in Special:Specialpages.

Derived classes can override this, but usually it is easier to keep the default behavior.

Returns
string

Reimplemented in SpecialCreateAccount, SpecialEditTags, SpecialEmailUser, and SpecialUserLogin.

Definition at line 606 of file SpecialPage.php.

References msg().

Referenced by QueryPage\feedTitle(), SpecialNewpages\feedTitle(), and setHeaders().

◆ getFinalGroupName()

SpecialPage::getFinalGroupName ( )

Get the group that the special page belongs in on Special:SpecialPage Use this method, instead of getGroupName to allow customization of the group name from the wiki side.

Returns
string Group of this special page
Since
1.21

Definition at line 805 of file SpecialPage.php.

References $name, getGroupName(), getName(), and msg().

◆ getFullTitle()

SpecialPage::getFullTitle ( )

Return the full title, including $par.

Returns
Title
Since
1.18

Definition at line 724 of file SpecialPage.php.

References getContext().

Referenced by checkLoginSecurityLevel(), LoginSignupSpecialPage\execute(), AuthManagerSpecialPage\getAuthForm(), and AuthManagerSpecialPage\handleReauthBeforeExecute().

◆ getGroupName()

SpecialPage::getGroupName ( )
protected

Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Returns
string
Since
1.21

Reimplemented in ChangesListSpecialPage, LoginSignupSpecialPage, SpecialActiveUsers, SpecialAllMessages, SpecialAllPages, AncientPagesPage, SpecialApiSandbox, SpecialBlock, SpecialBlockList, SpecialBookSources, SpecialBotPasswords, BrokenRedirectsPage, SpecialCategories, SpecialChangeContentModel, SpecialChangeCredentials, SpecialChangeEmail, SpecialComparePages, SpecialContributions, SpecialCreateAccount, DeadendPagesPage, DeletedContributionsPage, DoubleRedirectsPage, SpecialEditTags, SpecialEmailUser, SpecialExpandTemplates, SpecialExport, FewestrevisionsPage, FileDuplicateSearchPage, SpecialFilepath, SpecialGoToInterwiki, SpecialImport, SpecialJavaScriptTest, SpecialLinkAccounts, LinkSearchPage, ListDuplicatedFilesPage, SpecialListFiles, SpecialListGrants, SpecialListGroupRights, ListredirectsPage, SpecialListUsers, SpecialLockdb, SpecialLog, LonelyPagesPage, LongPagesPage, MediaStatisticsPage, SpecialMergeHistory, MIMEsearchPage, MostcategoriesPage, MostimagesPage, MostinterwikisPage, MostlinkedPage, MostlinkedCategoriesPage, MostlinkedTemplatesPage, MostrevisionsPage, MovePageForm, SpecialNewFiles, SpecialNewpages, SpecialPageLanguage, SpecialPagesWithProp, SpecialPasswordReset, SpecialPreferences, SpecialPrefixindex, SpecialProtectedpages, SpecialProtectedtitles, SpecialRandomInCategory, RandomPage, SpecialRedirect, SpecialResetTokens, SpecialRevisionDelete, SpecialSearch, ShortPagesPage, SpecialStatistics, SpecialTags, SpecialTrackingCategories, SpecialUnblock, UncategorizedImagesPage, UncategorizedPagesPage, SpecialUndelete, SpecialUnlinkAccounts, SpecialUnlockdb, UnusedCategoriesPage, UnusedimagesPage, UnusedtemplatesPage, UnwatchedpagesPage, SpecialUpload, SpecialUserLogin, SpecialUserLogout, UserrightsPage, SpecialVersion, WantedCategoriesPage, WantedFilesPage, WantedPagesPage, WantedTemplatesPage, SpecialWhatLinksHere, and WithoutInterwikiPage.

Definition at line 838 of file SpecialPage.php.

Referenced by getFinalGroupName().

◆ getLanguage()

SpecialPage::getLanguage ( )

Shortcut to get user's language.

Returns
Language
Since
1.19

Definition at line 705 of file SpecialPage.php.

References getContext().

Referenced by SpecialEditTags\buildCheckBoxes(), SpecialEditWatchlist\buildRemoveLine(), SpecialVersion\compare(), SpecialContributions\contributionsSub(), SpecialUndelete\diffHeader(), SpecialWatchlist\doHeader(), SpecialTags\doTagRow(), QueryPage\execute(), SpecialAllPages\execute(), SpecialBlockList\execute(), FileDuplicateSearchPage\execute(), LinkSearchPage\execute(), SpecialTrackingCategories\execute(), SpecialJavaScriptTest\exportQUnit(), SpecialNewpages\filterLinks(), SpecialMyLanguage\findTitle(), SpecialUndelete\formatFileRow(), SpecialListGroupRights\formatPermissions(), WantedQueryPage\formatResult(), AncientPagesPage\formatResult(), BrokenRedirectsPage\formatResult(), DoubleRedirectsPage\formatResult(), FewestrevisionsPage\formatResult(), FileDuplicateSearchPage\formatResult(), ListredirectsPage\formatResult(), MIMEsearchPage\formatResult(), MostcategoriesPage\formatResult(), MostinterwikisPage\formatResult(), MostlinkedPage\formatResult(), MostlinkedCategoriesPage\formatResult(), MostlinkedTemplatesPage\formatResult(), SpecialPagesWithProp\formatResult(), ShortPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), UnwatchedpagesPage\formatResult(), WantedCategoriesPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialNewpages\formatRow(), SpecialProtectedtitles\formatRow(), SpecialCachedPage\getCacheKey(), SpecialVersion\getCreditsForExtension(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), MediaStatisticsPage\getExtensionList(), SpecialUndelete\getFileLink(), SpecialWhatLinksHere\getFilterPanel(), SpecialBotPasswords\getFormFields(), SpecialPageLanguage\getFormFields(), SpecialStatistics\getGroupStats(), SpecialEditWatchlist\getNormalForm(), SpecialStatistics\getOtherStats(), SpecialUndelete\getPageLink(), SpecialStatistics\getPageStats(), SpecialWhatLinksHere\getPrevNext(), DeletedContributionsPage\getSubTitle(), SpecialStatistics\getUserStats(), SpecialWhatLinksHere\listItem(), SpecialVersion\listToText(), LoginSignupSpecialPage\makeLanguageSelector(), LoginSignupSpecialPage\makeLanguageSelectorLink(), SpecialRecentChanges\optionsPanel(), SpecialEditWatchlist\outputSubtitle(), SpecialNewpages\parseParams(), SpecialUpload\processVerificationError(), SpecialSearch\searchProfileTabs(), SpecialAllPages\showChunk(), SpecialEditTags\showConvenienceLinks(), SpecialRevisionDelete\showConvenienceLinks(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialEditTags\showForm(), SpecialRevisionDelete\showForm(), SpecialSearch\showHit(), SpecialUndelete\showList(), EmailConfirmation\showRequestForm(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), MovePageForm\showSubpagesList(), SpecialRevisionDelete\tryShowFile(), and SpecialWhatLinksHere\wlhLink().

◆ getLinkRenderer()

◆ getLocalName()

SpecialPage::getLocalName ( )

Get the localised name of the special page.

Returns
string

Definition at line 234 of file SpecialPage.php.

References $mLocalName, and SpecialPageFactory\getLocalNameFor().

◆ getLoginSecurityLevel()

SpecialPage::getLoginSecurityLevel ( )
protected

Tells if the special page does something security-sensitive and needs extra defense against a stolen account (e.g.

a reauthentication). What exactly that will mean is decided by the authentication framework.

Returns
bool|string False or the argument for AuthManager::securitySensitiveOperationStatus(). Typically a special page needing elevated security would return its name here.

Reimplemented in AuthManagerSpecialPage, SpecialCreateAccount, SpecialUnlinkAccounts, and SpecialUserLogin.

Definition at line 351 of file SpecialPage.php.

Referenced by execute().

◆ getName()

◆ getOutput()

SpecialPage::getOutput ( )

Get the OutputPage being used for this instance.

Returns
OutputPage
Since
1.18

Definition at line 675 of file SpecialPage.php.

References getContext().

Referenced by SpecialCachedPage\addCachedHTML(), addFeedLinks(), SpecialLog\addHeader(), addHelpLink(), ChangesListSpecialPage\addModules(), SpecialRecentChanges\addModules(), SpecialRevisionDelete\addUsageText(), SpecialPageLanguage\alterForm(), EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), AuthManagerSpecialPage\beforeExecute(), SpecialUserLogin\beforeExecute(), checkLoginSecurityLevel(), SpecialContributions\contributionsSub(), SpecialRedirect\dispatch(), QueryPage\doFeed(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialImport\doImport(), SpecialRecentChangesLinked\doMainQuery(), MovePageForm\doSubmit(), UserrightsPage\editUserGroupsForm(), EmailConfirmation\execute(), SpecialBookSources\execute(), SpecialEditWatchlist\execute(), QueryPage\execute(), SpecialActiveUsers\execute(), SpecialAllMessages\execute(), SpecialAllPages\execute(), SpecialApiHelp\execute(), SpecialApiSandbox\execute(), SpecialBlankpage\execute(), SpecialBlockList\execute(), SpecialBotPasswords\execute(), SpecialCategories\execute(), SpecialChangeEmail\execute(), SpecialComparePages\execute(), SpecialContributions\execute(), DeletedContributionsPage\execute(), SpecialEditTags\execute(), SpecialEmailUser\execute(), SpecialExport\execute(), FileDuplicateSearchPage\execute(), SpecialGoToInterwiki\execute(), SpecialImport\execute(), SpecialJavaScriptTest\execute(), LinkSearchPage\execute(), SpecialListFiles\execute(), SpecialListGrants\execute(), SpecialListGroupRights\execute(), SpecialListUsers\execute(), SpecialLog\execute(), SpecialMergeHistory\execute(), SpecialNewFiles\execute(), SpecialNewpages\execute(), SpecialPagesWithProp\execute(), SpecialPreferences\execute(), SpecialPrefixindex\execute(), SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), RandomPage\execute(), SpecialResetTokens\execute(), SpecialRevisionDelete\execute(), SpecialSearch\execute(), SpecialSpecialpages\execute(), SpecialStatistics\execute(), SpecialTrackingCategories\execute(), SpecialUnblock\execute(), SpecialUndelete\execute(), UnwatchedpagesPage\execute(), SpecialUserLogout\execute(), UserrightsPage\execute(), SpecialVersion\execute(), SpecialWhatLinksHere\execute(), SpecialRunJobs\execute(), ChangesListSpecialPage\execute(), LoginSignupSpecialPage\execute(), RedirectSpecialPage\execute(), SpecialExpandTemplates\execute(), SpecialLinkAccounts\execute(), SpecialRecentChanges\execute(), SpecialWatchlist\execute(), SpecialEditWatchlist\executeViewEditWatchlist(), SpecialJavaScriptTest\exportQUnit(), SpecialEditTags\failure(), SpecialRevisionDelete\failure(), SpecialNewpages\feed(), SpecialNewpages\form(), SpecialLog\getActionButtons(), SpecialVersion\getCreditsForExtension(), DeletedContributionsPage\getSubTitle(), SpecialSearch\goResult(), AuthManagerSpecialPage\handleReauthBeforeExecute(), AuthManagerSpecialPage\handleReturnBeforeExecute(), SpecialVersion\listAuthors(), LoginSignupSpecialPage\mainLoginForm(), SpecialMergeHistory\merge(), SpecialCachedPage\onCacheInitialized(), SpecialBotPasswords\onSubmit(), SpecialChangeContentModel\onSubmit(), SpecialRandomInCategory\onSubmit(), SpecialBotPasswords\onSuccess(), SpecialChangeContentModel\onSuccess(), SpecialChangeEmail\onSuccess(), SpecialLockdb\onSuccess(), SpecialPageLanguage\onSuccess(), SpecialPasswordReset\onSuccess(), SpecialResetTokens\onSuccess(), SpecialUnlockdb\onSuccess(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), outputHeader(), MediaStatisticsPage\outputMediaType(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialSpecialpages\outputPageList(), MediaStatisticsPage\outputResults(), SpecialEditWatchlist\outputSubtitle(), MediaStatisticsPage\outputTableEnd(), MediaStatisticsPage\outputTableRow(), MediaStatisticsPage\outputTableStart(), SpecialJavaScriptTest\plainQUnit(), SpecialPageLanguage\preText(), SpecialUpload\processUpload(), SpecialUndelete\redirectToRevDel(), setHeaders(), SpecialUserLogin\setHeaders(), SpecialNewFiles\setTopText(), SpecialRecentChanges\setTopText(), SpecialRecentChangesLinked\setTopText(), SpecialWatchlist\setTopText(), SpecialSearch\setupPage(), SpecialLog\show(), SpecialTags\showActivateDeactivateForm(), SpecialAllPages\showChunk(), SpecialEditTags\showConvenienceLinks(), SpecialRevisionDelete\showConvenienceLinks(), SpecialSearch\showCreateLink(), SpecialTags\showDeleteTagForm(), SpecialUndelete\showDiff(), UserrightsPage\showEditUserGroupsForm(), QueryPage\showEmptyText(), SpecialUndelete\showFile(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialWhatLinksHere\showIndirectLinks(), FileDuplicateSearchPage\showList(), SpecialBookSources\showList(), SpecialUndelete\showList(), SpecialBlockList\showList(), MovePageForm\showLogFragment(), SpecialMergeHistory\showMergeForm(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUndelete\showSearchForm(), SpecialChangeCredentials\showSubpageList(), MovePageForm\showSubpages(), MovePageForm\showSubpagesList(), LoginSignupSpecialPage\showSuccessPage(), SpecialTags\showTagList(), SpecialUploadStash\showUpload(), SpecialUpload\showUploadForm(), SpecialUploadStash\showUploads(), SpecialUpload\showUploadWarning(), SpecialUpload\showViewDeletedLinks(), SpecialEditTags\submit(), SpecialRevisionDelete\submit(), SpecialPreferences\submitReset(), SpecialChangeCredentials\success(), SpecialEditTags\success(), SpecialRevisionDelete\success(), SpecialCreateAccount\successfulAction(), UserrightsPage\switchForm(), SpecialRevisionDelete\tryShowFile(), SpecialUndelete\undelete(), SpecialUpload\unsaveUploadedFile(), and SpecialEmailUser\userForm().

◆ getPageTitle()

SpecialPage::getPageTitle (   $subpage = false)

Get a self-referential title object.

Parameters
string | bool$subpage
Returns
Title
Since
1.23

Definition at line 628 of file SpecialPage.php.

References getTitleFor().

Referenced by SpecialBookSources\buildForm(), SpecialUndelete\diffHeader(), SpecialRecentChanges\doHeader(), SpecialTags\doTagRow(), QueryPage\execute(), SpecialApiHelp\execute(), SpecialBlockList\execute(), SpecialEmailUser\execute(), FileDuplicateSearchPage\execute(), SpecialImport\execute(), LinkSearchPage\execute(), SpecialSearch\execute(), SpecialWhatLinksHere\execute(), LoginSignupSpecialPage\execute(), SpecialExpandTemplates\execute(), SpecialLinkAccounts\execute(), SpecialWatchlist\execute(), SpecialNewpages\feed(), QueryPage\feedUrl(), SpecialNewpages\filterLinks(), SpecialUndelete\formatFileRow(), SpecialUndelete\formatRevisionRow(), LoginSignupSpecialPage\getAuthForm(), SpecialEditWatchlist\getClearForm(), SpecialVersion\getCreditsForExtension(), SpecialSearch\getDidYouMeanHtml(), SpecialSearch\getDidYouMeanRewrittenHtml(), LoginSignupSpecialPage\getFakeTemplate(), SpecialBotPasswords\getFormFields(), SpecialEditWatchlist\getNormalForm(), MIMEsearchPage\getPageHeader(), SpecialEditWatchlist\getRawForm(), UserrightsPage\getSuccessURL(), getTitle(), SpecialUpload\getUploadForm(), AuthManagerSpecialPage\handleReturnBeforeExecute(), SpecialVersion\listAuthors(), LoginSignupSpecialPage\load(), LoginSignupSpecialPage\mainLoginForm(), LoginSignupSpecialPage\makeLanguageSelectorLink(), SpecialRecentChanges\makeOptionsLink(), SpecialSearch\makeSearchLink(), SpecialPrefixindex\namespacePrefixForm(), SpecialBotPasswords\onSubmit(), SpecialBotPasswords\onSuccess(), AuthManagerSpecialPage\performAuthenticationStep(), SpecialJavaScriptTest\plainQUnit(), SpecialTags\processCreateTagForm(), SpecialTags\processTagForm(), SpecialWatchlist\setTopText(), SpecialSearch\shortDialog(), SpecialTags\showActivateDeactivateForm(), SpecialAllPages\showChunk(), SpecialTags\showDeleteTagForm(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialUndelete\showList(), SpecialMergeHistory\showMergeForm(), SpecialProtectedtitles\showOptions(), SpecialProtectedpages\showOptions(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUndelete\showSearchForm(), SpecialTags\showTagList(), SpecialUploadStash\showUploads(), SpecialPreferences\submitReset(), SpecialCreateAccount\successfulAction(), UserrightsPage\switchForm(), SpecialRevisionDelete\tryShowFile(), SpecialEmailUser\userForm(), SpecialWhatLinksHere\whatlinkshereForm(), and SpecialWhatLinksHere\wlhLink().

◆ getRequest()

SpecialPage::getRequest ( )

Get the WebRequest being used for this instance.

Returns
WebRequest
Since
1.18

Reimplemented in AuthManagerSpecialPage.

Definition at line 665 of file SpecialPage.php.

References getContext().

Referenced by SpecialBlock\alterForm(), SpecialChangeEmail\alterForm(), SpecialPasswordReset\alterForm(), SpecialRevisionDelete\buildCheckBoxes(), checkLoginSecurityLevel(), SpecialRedirect\dispatchFile(), SpecialImport\doImport(), SpecialBookSources\execute(), SpecialEditWatchlist\execute(), SpecialActiveUsers\execute(), SpecialAllMessages\execute(), SpecialAllPages\execute(), SpecialApiHelp\execute(), SpecialBlockList\execute(), SpecialCategories\execute(), SpecialContributions\execute(), DeletedContributionsPage\execute(), SpecialEditTags\execute(), SpecialEmailUser\execute(), SpecialExport\execute(), FileDuplicateSearchPage\execute(), SpecialImport\execute(), LinkSearchPage\execute(), SpecialListFiles\execute(), SpecialLog\execute(), MIMEsearchPage\execute(), MovePageForm\execute(), SpecialNewFiles\execute(), SpecialPagesWithProp\execute(), SpecialPreferences\execute(), SpecialPrefixindex\execute(), SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), RandomPage\execute(), SpecialRevisionDelete\execute(), SpecialSearch\execute(), SpecialTags\execute(), SpecialUnblock\execute(), SpecialUserLogout\execute(), UserrightsPage\execute(), SpecialWhatLinksHere\execute(), WithoutInterwikiPage\execute(), SpecialRunJobs\execute(), SpecialExpandTemplates\execute(), SpecialRecentChanges\execute(), SpecialWatchlist\execute(), SpecialRevisionDelete\extractBitParams(), ChangesListSpecialPage\fetchOptionsFromRequest(), SpecialWatchlist\fetchOptionsFromRequest(), SpecialWatchlist\getDefaultOptions(), FormSpecialPage\getForm(), QueryPage\getLimitOffset(), SpecialFilepath\getRedirect(), RedirectSpecialPage\getRedirectQuery(), SpecialEditWatchlist\getWatchlist(), SpecialVersion\IPInfo(), SpecialSearch\load(), SpecialUndelete\loadRequest(), SpecialUpload\loadRequest(), SpecialMergeHistory\loadRequestParams(), SpecialBlock\maybeAlterFormDefaults(), SpecialBotPasswords\onSubmit(), SpecialChangeContentModel\onSubmit(), SpecialChangeEmail\onSuccess(), SpecialUpload\processUpload(), SpecialUndelete\redirectToRevDel(), SpecialSearch\saveNamespaces(), UserrightsPage\saveUserGroups(), SpecialBlock\setParameter(), SpecialChangeContentModel\setParameter(), SpecialNewpages\setup(), SpecialUndelete\showFile(), SpecialRevisionDelete\showForm(), SpecialExpandTemplates\showHtmlPreview(), SpecialCachedPage\startCache(), SpecialEditTags\submit(), SpecialRevisionDelete\submit(), SpecialPreferences\submitReset(), SpecialRevisionDelete\tryShowFile(), and useTransactionalTimeLimit().

◆ getRestriction()

SpecialPage::getRestriction ( )

Get the permission that a user must have to execute this page.

Returns
string

Definition at line 158 of file SpecialPage.php.

References $mRestriction.

◆ getRobotPolicy()

SpecialPage::getRobotPolicy ( )
protected

Return the robot policy.

Derived classes that override this can change the robot policy set by setHeaders() from the default 'noindex,nofollow'.

Returns
string
Since
1.23

Definition at line 735 of file SpecialPage.php.

Referenced by setHeaders().

◆ getSafeTitleFor()

static SpecialPage::getSafeTitleFor (   $name,
  $subpage = false 
)
static

Get a localised Title object for a page name with a possibly unvalidated subpage.

Parameters
string$name
string | bool$subpageSubpage string, or false to not use a subpage
Returns
Title|null Title object or null if the page doesn't exist

Definition at line 110 of file SpecialPage.php.

References $name, SpecialPageFactory\getLocalNameFor(), and NS_SPECIAL.

Referenced by EmailNotification\composeCommonMailtext(), SpecialFilepath\getRedirect(), Skin\makeSpecialUrl(), and Skin\makeSpecialUrlSubpage().

◆ getSkin()

◆ getSubpagesForPrefixSearch()

SpecialPage::getSubpagesForPrefixSearch ( )
protected

Return an array of subpages that this special page will accept for prefix searches.

If this method requires a query you might instead want to implement prefixSearchSubpages() directly so you can support $limit and $offset. This method is better for static-ish lists of things.

Returns
string[] subpages to search from

Reimplemented in SpecialEditWatchlist, SpecialJavaScriptTest, SpecialListUsers, SpecialLog, SpecialRedirect, SpecialTags, and SpecialWatchlist.

Definition at line 437 of file SpecialPage.php.

Referenced by prefixSearchSubpages().

◆ getTitle()

SpecialPage::getTitle (   $subpage = false)

Get a self-referential title object.

Parameters
string | bool$subpage
Returns
Title
Deprecated:
since 1.23, use SpecialPage::getPageTitle

Definition at line 617 of file SpecialPage.php.

References getPageTitle().

Referenced by SpecialTags\doTagRow(), SpecialUpload\getExistsWarning(), and SpecialRevisionDelete\showForm().

◆ getTitleFor()

static SpecialPage::getTitleFor (   $name,
  $subpage = false,
  $fragment = '' 
)
static

Get a localised Title object for a specified special page name If you don't need a full Title object, consider using TitleValue through getTitleValueFor() below.

Since
1.9
1.21 $fragment parameter added
Parameters
string$name
string | bool$subpageSubpage string, or false to not use a subpage
string$fragmentThe link fragment (after the "#")
Returns
Title
Exceptions
MWException

Definition at line 82 of file SpecialPage.php.

References $name.

Referenced by ApiQuerySiteinfo\appendExtensions(), EmailConfirmation\attemptConfirm(), SpecialUserLogin\beforeExecute(), Linker\blockLink(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SpecialEditWatchlist\buildRemoveLine(), SpecialEditWatchlist\buildTools(), checkLoginSecurityLevel(), Title\checkReadPermissions(), ApiFormatBase\closePrinter(), DifferenceEngine\deletedLink(), SpecialTags\doTagRow(), Linker\emailLink(), SpecialEditWatchlist\execute(), SpecialBlockList\execute(), SpecialListGroupRights\execute(), SpecialResetTokens\execute(), SpecialUserLogout\execute(), SpecialWatchlist\execute(), ApiFeedContributions\execute(), ApiFeedWatchlist\execute(), ApiHelp\execute(), TidyUpBug37714\execute(), SpecialEditWatchlist\executeViewEditWatchlist(), OldChangesList\formatChangeLine(), ListDuplicatedFilesPage\formatResult(), UnusedtemplatesPage\formatResult(), DeletedContribsPager\formatRevisionRow(), BlockListPager\formatValue(), BlockLogFormatter\getActionLinks(), ContentModelLogFormatter\getActionLinks(), DeleteLogFormatter\getActionLinks(), MergeLogFormatter\getActionLinks(), MoveLogFormatter\getActionLinks(), RevDelArchivedFileItem\getApiData(), RevDelFileItem\getApiData(), PreferencesForm\getButtons(), InfoAction\getContributors(), HistoryAction\getDescription(), RevDelArchiveItem\getDiffLink(), ApiFeedRecentChanges\getFeedObject(), LoginSignupSpecialPage\getFieldDefinitions(), Title\getFullUrlForRedirect(), MWGrants\getGrantsLink(), SpecialStatistics\getGroupStats(), OutputPage\getHeadLinksArray(), ApiHelp\getHelpInternal(), ChangeTagsLogItem\getHTML(), RevDelLogItem\getHTML(), RevDelArchivedFileItem\getLink(), RevDelFileItem\getLink(), RCCacheEntryFactory\getLogLink(), ApiParamInfo\getModuleInfo(), SearchNearMatcher\getNearMatchInternal(), SpecialStatistics\getPageStats(), getPageTitle(), ManualLogEntry\getRecentChange(), SpecialRedirectToSpecial\getRedirect(), SpecialMycontributions\getRedirect(), SpecialMyuploads\getRedirect(), SpecialAllMyUploads\getRedirect(), RevDelArchiveItem\getRevisionLink(), Skin\getSearchLink(), LogEventsList\getShowHideLinks(), UploadStashFile\getSpecialUrl(), DeletedContributionsPage\getSubTitle(), MediaWiki\getTitle(), AllMessagesTablePager\getTitle(), ImageListPager\getTitle(), SpecialPageFactory\getTitleForAlias(), Skin\getUndeleteLink(), Linker\getUploadUrl(), ImagePage\getUploadUrl(), SpecialStatistics\getUserStats(), AuthManagerSpecialPage\handleReauthBeforeExecute(), ImageHistoryList\imageHistoryLine(), CreditsAction\link(), EnhancedChangesList\makeCacheGroupingKey(), MostlinkedPage\makeWlhLink(), WantedQueryPage\makeWlhLink(), MostlinkedTemplatesPage\makeWlhLink(), RecentChangesUpdateJob\newCacheUpdateJob(), RecentChangesUpdateJob\newPurgeJob(), MarkpatrolledAction\onView(), ImagePage\openShowImage(), SpecialListGroupRights\outputNamespaceProtectionInfo(), MediaStatisticsPage\outputTableRow(), InfoAction\pageInfo(), MediaWiki\parseTitle(), MediaWiki\performRequest(), SpecialBlock\postText(), SkinTemplate\prepareQuickTemplate(), Preferences\profilePreferences(), EnhancedChangesList\recentChangesBlockLine(), SpecialUndelete\redirectToRevDel(), UserNotLoggedIn\report(), Linker\revDeleteLink(), LogPage\saveContent(), UserMailer\sendInternal(), SpecialEditTags\showConvenienceLinks(), SpecialRevisionDelete\showConvenienceLinks(), EditPage\showHeader(), LogEventsList\showOptions(), OutputPage\showPermissionsErrorPage(), SpecialUpload\showUploadWarning(), SpecialUpload\showViewDeletedLinks(), CoreParserFunctions\special(), Linker\specialLink(), RevDelLogList\suggestTarget(), SpecialPageTest\testGetTitleFor(), SpecialPageTest\testGetTitleForWithWarning(), SpecialPageTest\testInvalidGetTitleFor(), LinkerTest\testLinkBeginHook(), LinkerTest\testLinkEndHook(), ExtraParserTest\testTrackingCategorySpecial(), MediaWiki\tryNormaliseRedirect(), ChangeTags\updateTagsWithChecks(), Linker\userLink(), Linker\userToolLinks(), and Preferences\watchlistPreferences().

◆ getTitleValueFor()

static SpecialPage::getTitleValueFor (   $name,
  $subpage = false,
  $fragment = '' 
)
static

Get a localised TitleValue object for a specified special page name.

Since
1.28
Parameters
string$name
string | bool$subpageSubpage string, or false to not use a subpage
string$fragmentThe link fragment (after the "#")
Returns
TitleValue

Definition at line 97 of file SpecialPage.php.

References $name, SpecialPageFactory\getLocalNameFor(), and NS_SPECIAL.

Referenced by Linker\normaliseSpecialPage(), and InfoAction\pageInfo().

◆ getUser()

SpecialPage::getUser ( )

Shortcut to get the User executing this instance.

Returns
User
Since
1.18

Definition at line 685 of file SpecialPage.php.

References getContext().

Referenced by UserrightsPage\addLogEntry(), SpecialRevisionDelete\addUsageText(), EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), SpecialNewFiles\buildForm(), ChangesListSpecialPage\buildMainQueryConds(), UserrightsPage\changeableGroups(), SpecialBotPasswords\checkExecutePermissions(), SpecialChangeEmail\checkExecutePermissions(), checkPermissions(), SpecialCreateAccount\checkPermissions(), SpecialEditWatchlist\cleanupWatchlist(), SpecialEditWatchlist\clearWatchlist(), SpecialWatchlist\countItems(), SpecialWatchlist\cutoffselector(), SpecialUndelete\diffHeader(), SpecialWatchlist\doHeader(), SpecialImport\doImport(), SpecialRecentChanges\doMainQuery(), SpecialRecentChangesLinked\doMainQuery(), SpecialWatchlist\doMainQuery(), UserrightsPage\doSaveUserGroups(), MovePageForm\doSubmit(), EmailConfirmation\execute(), FormSpecialPage\execute(), QueryPage\execute(), SpecialApiSandbox\execute(), SpecialContributions\execute(), DeletedContributionsPage\execute(), SpecialEditTags\execute(), SpecialEmailUser\execute(), SpecialImport\execute(), SpecialLog\execute(), MovePageForm\execute(), SpecialPreferences\execute(), SpecialRevisionDelete\execute(), SpecialUndelete\execute(), SpecialUpload\execute(), SpecialUserLogout\execute(), UserrightsPage\execute(), LoginSignupSpecialPage\execute(), SpecialUnlinkAccounts\execute(), SpecialUploadStash\execute(), SpecialWatchlist\execute(), UserrightsPage\fetchUser(), SpecialNewpages\filterLinks(), SpecialUndelete\formatFileRow(), BrokenRedirectsPage\formatResult(), DoubleRedirectsPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialProtectedtitles\formatRow(), SpecialLog\getActionButtons(), SpecialBlockList\getBlockListPager(), SpecialRecentChanges\getDefaultOptions(), SpecialWatchlist\getDefaultOptions(), LoginSignupSpecialPage\getFakeTemplate(), LoginSignupSpecialPage\getFieldDefinitions(), SpecialUndelete\getFileLink(), SpecialBlock\getFormFields(), SpecialBotPasswords\getFormFields(), SpecialChangeEmail\getFormFields(), SpecialEmailUser\getFormFields(), SpecialPasswordReset\getFormFields(), SpecialResetTokens\getFormFields(), SpecialSpecialpages\getPageGroups(), SpecialUndelete\getPageLink(), SpecialMypage\getRedirect(), SpecialMytalk\getRedirect(), SpecialMycontributions\getRedirect(), SpecialMyuploads\getRedirect(), SpecialAllMyUploads\getRedirect(), SpecialUpload\getWatchCheck(), SpecialEditWatchlist\getWatchlist(), SpecialEditWatchlist\getWatchlistInfo(), SpecialUndelete\isAllowed(), SpecialSearch\load(), AuthManagerSpecialPage\loadAuth(), SpecialUndelete\loadRequest(), SpecialUpload\loadRequest(), SpecialMergeHistory\loadRequestParams(), LoginSignupSpecialPage\mainLoginForm(), SpecialBlock\maybeAlterFormDefaults(), SpecialMergeHistory\merge(), SpecialChangeContentModel\onSubmit(), SpecialChangeEmail\onSubmit(), SpecialLockdb\onSubmit(), SpecialPageLanguage\onSubmit(), SpecialPasswordReset\onSubmit(), SpecialResetTokens\onSubmit(), SpecialBotPasswords\onSuccess(), SpecialChangeEmail\onSuccess(), SpecialPasswordReset\onSuccess(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), SpecialWatchlist\outputFeedLinks(), SpecialEditWatchlist\outputSubtitle(), SpecialNewpages\patrollable(), AuthManagerSpecialPage\performAuthenticationStep(), LoginSignupSpecialPage\postProcessFormDescriptor(), SpecialSearch\powerSearchBox(), SpecialUpload\processUpload(), requireLogin(), SpecialSearch\saveNamespaces(), SpecialUserLogin\setHeaders(), SpecialWatchlist\setTopText(), SpecialNewpages\setup(), SpecialTags\showActivateDeactivateForm(), SpecialRevisionDelete\showConvenienceLinks(), LoginSignupSpecialPage\showCreateAccountLink(), SpecialTags\showDeleteTagForm(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialSearch\showHit(), SpecialExpandTemplates\showHtmlPreview(), SpecialUpload\showRecoverableUploadError(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialUndelete\showRevision(), LoginSignupSpecialPage\showSuccessPage(), SpecialTags\showTagList(), SpecialUpload\showUploadWarning(), SpecialUpload\showViewDeletedLinks(), SpecialEditTags\submit(), SpecialRevisionDelete\submit(), SpecialEditWatchlist\submitClear(), SpecialEditWatchlist\submitRaw(), SpecialPreferences\submitReset(), EmailConfirmation\submitSend(), SpecialChangeCredentials\success(), SpecialCreateAccount\successfulAction(), SpecialUserLogin\successfulAction(), SpecialRevisionDelete\tryShowFile(), SpecialUndelete\undelete(), SpecialEditWatchlist\unwatchTitles(), SpecialExport\userCanOverrideExportDepth(), SpecialEditWatchlist\watchTitles(), and SpecialWhatLinksHere\wlhLink().

◆ including()

◆ isCached()

SpecialPage::isCached ( )

Is this page cached? Expensive pages are cached or disabled in miser mode.

Used by QueryPage and subclasses, moved here so that Special:SpecialPages can safely call it for all special pages.

Returns
bool
Since
1.21

Reimplemented in QueryPage, and FileDuplicateSearchPage.

Definition at line 263 of file SpecialPage.php.

◆ isExpensive()

SpecialPage::isExpensive ( )

Is this page expensive (for some definition of expensive)? Expensive pages are disabled or cached in miser mode.

Originally used (and still overridden) by QueryPage and subclasses, moved here so that Special:SpecialPages can safely call it for all special pages.

Returns
bool

Reimplemented in QueryPage, WantedQueryPage, AncientPagesPage, BrokenRedirectsPage, DeadendPagesPage, DoubleRedirectsPage, FewestrevisionsPage, ListDuplicatedFilesPage, ListredirectsPage, LonelyPagesPage, MediaStatisticsPage, MIMEsearchPage, MostcategoriesPage, MostimagesPage, MostinterwikisPage, MostlinkedPage, MostlinkedTemplatesPage, UncategorizedImagesPage, UncategorizedPagesPage, UnusedCategoriesPage, UnusedimagesPage, UnusedtemplatesPage, UnwatchedpagesPage, and WithoutInterwikiPage.

Definition at line 250 of file SpecialPage.php.

◆ isIncludable()

SpecialPage::isIncludable ( )

Whether it's allowed to transclude the special page via {{Special:Foo/params}}.

Returns
bool

Reimplemented in IncludableSpecialPage, SpecialApiHelp, SpecialRecentChanges, and WantedPagesPage.

Definition at line 196 of file SpecialPage.php.

References $mIncludable.

◆ isListed()

SpecialPage::isListed ( )

Whether this special page is listed in Special:SpecialPages.

Since
1.3 (r3583)
Returns
bool

Reimplemented in UnlistedSpecialPage, SpecialBotPasswords, SpecialChangeCredentials, SpecialChangeEmail, SpecialLinkAccounts, SpecialPasswordReset, SpecialResetTokens, and SpecialUnlinkAccounts.

Definition at line 168 of file SpecialPage.php.

References $mListed.

◆ isRestricted()

SpecialPage::isRestricted ( )

Can be overridden by subclasses with more complicated permissions schemes.

Returns
bool Should the page be displayed with the restricted-access pages?

Reimplemented in SpecialCreateAccount, and UserrightsPage.

Definition at line 274 of file SpecialPage.php.

◆ listed()

SpecialPage::listed (   $x = null)

Get or set whether this special page is listed in Special:SpecialPages.

Since
1.6
Parameters
bool$x
Returns
bool

Definition at line 188 of file SpecialPage.php.

References wfSetVar().

◆ maxIncludeCacheTime()

SpecialPage::maxIncludeCacheTime ( )

How long to cache page when it is being included.

Note
If cache time is not 0, then the current user becomes an anon if you want to do any per-user customizations, than this method must be overriden to return 0.
Since
1.26
Returns
int Time in seconds, 0 to disable caching altogether, false to use the parent page's cache settings

Definition at line 210 of file SpecialPage.php.

References getCacheTTL(), and getConfig().

◆ msg()

SpecialPage::msg ( )

Wrapper around wfMessage that sets the current context.

Since
1.16
Returns
Message
See also
wfMessage

Definition at line 746 of file SpecialPage.php.

References getContext(), and including().

Referenced by addHelpLink(), SpecialBotPasswords\alterForm(), SpecialChangeEmail\alterForm(), SpecialLockdb\alterForm(), SpecialPasswordReset\alterForm(), SpecialUnlockdb\alterForm(), SpecialEditTags\buildCheckBoxes(), SpecialRevisionDelete\buildCheckBoxes(), SpecialEditWatchlist\buildRemoveLine(), SpecialRecentChanges\categoryFilterForm(), SpecialComparePages\checkExistingRevision(), SpecialComparePages\checkExistingTitle(), SpecialWatchlist\cutoffselector(), SpecialUndelete\diffHeader(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialRecentChangesLinked\doMainQuery(), MovePageForm\doSubmit(), SpecialTags\doTagRow(), SpecialEditWatchlist\execute(), QueryPage\execute(), SpecialActiveUsers\execute(), SpecialAllPages\execute(), SpecialApiHelp\execute(), SpecialBlockList\execute(), SpecialCategories\execute(), SpecialContributions\execute(), DeletedContributionsPage\execute(), SpecialEmailUser\execute(), SpecialExport\execute(), FileDuplicateSearchPage\execute(), SpecialJavaScriptTest\execute(), SpecialListGrants\execute(), SpecialListGroupRights\execute(), SpecialListUsers\execute(), SpecialMergeHistory\execute(), SpecialPagesWithProp\execute(), SpecialPreferences\execute(), SpecialPrefixindex\execute(), SpecialStatistics\execute(), SpecialTrackingCategories\execute(), SpecialUnblock\execute(), SpecialUndelete\execute(), SpecialUserLogout\execute(), UserrightsPage\execute(), SpecialVersion\execute(), SpecialWhatLinksHere\execute(), SpecialChangeCredentials\execute(), SpecialEditWatchlist\executeViewEditWatchlist(), SpecialEditTags\failure(), SpecialRevisionDelete\failure(), SpecialNewpages\feed(), QueryPage\feedDesc(), SpecialNewpages\feedItemDesc(), SpecialNewpages\filterLinks(), SpecialNewpages\form(), SpecialUndelete\formatFileRow(), SpecialListGroupRights\formatPermissions(), WantedQueryPage\formatResult(), BrokenRedirectsPage\formatResult(), DoubleRedirectsPage\formatResult(), FewestrevisionsPage\formatResult(), LinkSearchPage\formatResult(), ListDuplicatedFilesPage\formatResult(), MIMEsearchPage\formatResult(), MostcategoriesPage\formatResult(), MostinterwikisPage\formatResult(), MostlinkedPage\formatResult(), MostlinkedCategoriesPage\formatResult(), SpecialPagesWithProp\formatResult(), ShortPagesPage\formatResult(), UnwatchedpagesPage\formatResult(), WantedCategoriesPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialNewpages\formatRow(), SpecialProtectedtitles\formatRow(), SpecialStatistics\formatRow(), SpecialStatistics\formatRowHeader(), SpecialLog\getActionButtons(), SpecialProtectedpages\getCascadeCheck(), MostimagesPage\getCellHtml(), SpecialEditWatchlist\getClearForm(), SpecialVersion\getCreditsForExtension(), SpecialSearch\getCustomCaptions(), getDescription(), SpecialCreateAccount\getDescription(), SpecialEditTags\getDescription(), SpecialEmailUser\getDescription(), SpecialUserLogin\getDescription(), SpecialSearch\getDidYouMeanHtml(), SpecialSearch\getDidYouMeanRewrittenHtml(), SpecialUpload\getDupeWarning(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), SpecialProtectedpages\getExpiryCheck(), SpecialVersion\getExtensionCredits(), SpecialVersion\getExternalLibraries(), SpecialRecentChangesLinked\getExtraOptions(), LoginSignupSpecialPage\getFieldDefinitions(), SpecialUndelete\getFileComment(), SpecialUndelete\getFileUser(), SpecialWhatLinksHere\getFilterPanel(), getFinalGroupName(), FormSpecialPage\getForm(), SpecialBlock\getFormFields(), SpecialBotPasswords\getFormFields(), SpecialChangeContentModel\getFormFields(), SpecialChangeEmail\getFormFields(), SpecialEmailUser\getFormFields(), SpecialPageLanguage\getFormFields(), SpecialRedirect\getFormFields(), SpecialResetTokens\getFormFields(), SpecialStatistics\getGroupStats(), SpecialProtectedpages\getLevelMenu(), SpecialProtectedtitles\getLevelMenu(), SpecialImport\getMappingFormPart(), SpecialProtectedpages\getNamespaceMenu(), SpecialProtectedtitles\getNamespaceMenu(), SpecialEditWatchlist\getNormalForm(), RandomPage\getNsList(), SpecialStatistics\getOtherStats(), BrokenRedirectsPage\getPageHeader(), DeadendPagesPage\getPageHeader(), DoubleRedirectsPage\getPageHeader(), LonelyPagesPage\getPageHeader(), UnusedCategoriesPage\getPageHeader(), UnusedimagesPage\getPageHeader(), UnusedtemplatesPage\getPageHeader(), WantedFilesPage\getPageHeader(), LoginSignupSpecialPage\getPageHtml(), SpecialStatistics\getPageStats(), SpecialVersion\getParserFunctionHooks(), SpecialVersion\getParserTags(), SpecialWhatLinksHere\getPrevNext(), SpecialEditWatchlist\getRawForm(), SpecialProtectedpages\getRedirectCheck(), SpecialProtectedpages\getSizeLimit(), SpecialVersion\getSkinCredits(), SpecialJavaScriptTest\getSummaryHtml(), MediaStatisticsPage\getTableHeaderRow(), SpecialProtectedpages\getTypeMenu(), SpecialUpload\getUploadForm(), SpecialStatistics\getUserStats(), SpecialVersion\getWgHooks(), UserrightsPage\groupCheckboxes(), SpecialSearch\interwikiHeader(), SpecialVersion\listAuthors(), SpecialWhatLinksHere\listItem(), LoginSignupSpecialPage\load(), LoginSignupSpecialPage\mainLoginForm(), SpecialExpandTemplates\makeForm(), UserrightsPage\makeGroupNameList(), LoginSignupSpecialPage\makeLanguageSelector(), SpecialExpandTemplates\makeOutput(), SpecialSearch\makeSearchLink(), WantedQueryPage\makeWlhLink(), MostlinkedTemplatesPage\makeWlhLink(), SpecialMergeHistory\merge(), SpecialRecentChanges\namespaceFilterForm(), SpecialPrefixindex\namespacePrefixForm(), SpecialChangeContentModel\onSubmit(), SpecialLockdb\onSubmit(), SpecialRandomInCategory\onSubmit(), SpecialBotPasswords\onSuccess(), SpecialChangeContentModel\onSuccess(), SpecialLockdb\onSuccess(), SpecialPasswordReset\onSuccess(), SpecialUnlockdb\onSuccess(), SpecialVersion\openExtType(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), outputHeader(), MediaStatisticsPage\outputMediaType(), SpecialListGroupRights\outputNamespaceProtectionInfo(), MediaStatisticsPage\outputResults(), SpecialEditWatchlist\outputSubtitle(), MediaStatisticsPage\outputTableEnd(), MediaStatisticsPage\outputTableRow(), SpecialSearch\powerSearchBox(), SpecialTrackingCategories\prepareTrackingCategoriesData(), SpecialTags\processCreateTagForm(), SpecialTags\processTagForm(), SpecialUpload\processUpload(), SpecialUpload\processVerificationError(), SpecialSearch\searchProfileTabs(), SpecialUserLogin\setHeaders(), SpecialNewFiles\setTopText(), SpecialRecentChanges\setTopText(), SpecialWatchlist\setTopText(), SpecialSearch\setupPage(), SpecialSearch\shortDialog(), SpecialTags\showActivateDeactivateForm(), SpecialAllPages\showChunk(), SpecialEditTags\showConvenienceLinks(), SpecialRevisionDelete\showConvenienceLinks(), SpecialTags\showDeleteTagForm(), UserrightsPage\showEditUserGroupsForm(), MovePageForm\showForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialWatchlist\showHideCheck(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialSearch\showHit(), SpecialExpandTemplates\showHtmlPreview(), SpecialSearch\showInterwiki(), SpecialSearch\showInterwikiHit(), SpecialBookSources\showList(), SpecialUndelete\showList(), SpecialBlockList\showList(), SpecialMergeHistory\showMergeForm(), SpecialProtectedtitles\showOptions(), SpecialProtectedpages\showOptions(), SpecialPrefixindex\showPrefixChunk(), SpecialUpload\showRecoverableUploadError(), EmailConfirmation\showRequestForm(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUndelete\showSearchForm(), SpecialTags\showTagList(), SpecialEditWatchlist\showTitles(), SpecialUpload\showUploadError(), SpecialUploadStash\showUploads(), SpecialUpload\showUploadWarning(), SpecialUpload\showViewDeletedLinks(), SpecialSearch\startsWithAll(), SpecialRevisionDelete\submit(), SpecialEditWatchlist\submitClear(), SpecialEditWatchlist\submitNormal(), SpecialEditWatchlist\submitRaw(), EmailConfirmation\submitSend(), SpecialEditTags\success(), SpecialLinkAccounts\success(), SpecialRevisionDelete\success(), SpecialCreateAccount\successfulAction(), SpecialUserLogin\successfulAction(), UserrightsPage\switchForm(), SpecialUndelete\undelete(), SpecialEmailUser\userForm(), SpecialChangeContentModel\validateTitle(), and SpecialWhatLinksHere\whatlinkshereForm().

◆ outputHeader()

SpecialPage::outputHeader (   $summaryMessageKey = '')

Outputs a summary message on top of special pages Per default the message key is the canonical name of the special page May be overridden, i.e.

by extensions to stick with the naming conventions for message keys: 'extensionname-xxx'

Parameters
string$summaryMessageKeyMessage key of the summary

Definition at line 583 of file SpecialPage.php.

References $wgContLang, getName(), getOutput(), global, including(), and msg().

Referenced by SpecialRedirect\alterForm(), SpecialBookSources\execute(), SpecialEditWatchlist\execute(), QueryPage\execute(), SpecialActiveUsers\execute(), SpecialAllMessages\execute(), SpecialAllPages\execute(), SpecialBlockList\execute(), SpecialCategories\execute(), SpecialComparePages\execute(), SpecialContributions\execute(), DeletedContributionsPage\execute(), SpecialEditTags\execute(), SpecialEmailUser\execute(), SpecialExport\execute(), FileDuplicateSearchPage\execute(), SpecialImport\execute(), LinkSearchPage\execute(), SpecialListFiles\execute(), SpecialListGrants\execute(), SpecialListGroupRights\execute(), SpecialListUsers\execute(), SpecialLog\execute(), SpecialMergeHistory\execute(), MIMEsearchPage\execute(), MovePageForm\execute(), SpecialNewFiles\execute(), SpecialNewpages\execute(), SpecialPagesWithProp\execute(), SpecialPreferences\execute(), SpecialPrefixindex\execute(), SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), SpecialRevisionDelete\execute(), SpecialSearch\execute(), SpecialSpecialpages\execute(), SpecialTags\execute(), SpecialTrackingCategories\execute(), SpecialUnblock\execute(), SpecialUndelete\execute(), SpecialUpload\execute(), SpecialUserLogout\execute(), UserrightsPage\execute(), SpecialVersion\execute(), SpecialWhatLinksHere\execute(), ChangesListSpecialPage\execute(), execute(), SpecialChangeCredentials\execute(), SpecialLinkAccounts\execute(), SpecialUnlinkAccounts\execute(), and SpecialUploadStash\showUploads().

◆ prefixSearchArray()

static SpecialPage::prefixSearchArray (   $search,
  $limit,
array  $subpages,
  $offset 
)
staticprotected

Helper function for implementations of prefixSearchSubpages() that filter the values in memory (as opposed to making a query).

Since
1.24
Parameters
string$search
int$limit
array$subpages
int$offset
Returns
string[]

Definition at line 475 of file SpecialPage.php.

References $limit.

Referenced by prefixSearchSubpages(), and SpecialPagesWithProp\prefixSearchSubpages().

◆ prefixSearchString()

SpecialPage::prefixSearchString (   $search,
  $limit,
  $offset 
)
protected

Perform a regular substring search for prefixSearchSubpages.

Parameters
string$searchPrefix to search for
int$limitMaximum number of results to return (usually 10)
int$offsetNumber of results to skip (usually 0)
Returns
string[] Matching subpages

Definition at line 448 of file SpecialPage.php.

References $limit, $t, and $title.

Referenced by SpecialAllPages\prefixSearchSubpages(), SpecialChangeContentModel\prefixSearchSubpages(), MovePageForm\prefixSearchSubpages(), SpecialPageLanguage\prefixSearchSubpages(), SpecialPrefixindex\prefixSearchSubpages(), SpecialRecentChangesLinked\prefixSearchSubpages(), SpecialUndelete\prefixSearchSubpages(), and SpecialWhatLinksHere\prefixSearchSubpages().

◆ prefixSearchSubpages()

SpecialPage::prefixSearchSubpages (   $search,
  $limit,
  $offset 
)

Return an array of subpages beginning with $search that this special page will accept.

For example, if a page supports subpages "foo", "bar" and "baz" (as in Special:PageName/foo, etc.):

  • prefixSearchSubpages( "ba" ) should return array( "bar", "baz" )
  • prefixSearchSubpages( "f" ) should return array( "foo" )
  • prefixSearchSubpages( "z" ) should return array()
  • prefixSearchSubpages( "" ) should return array( foo", "bar", "baz" )
Parameters
string$searchPrefix to search for
int$limitMaximum number of results to return (usually 10)
int$offsetNumber of results to skip (usually 0)
Returns
string[] Matching subpages

Reimplemented in SpecialAllPages, SpecialBlock, SpecialChangeContentModel, SpecialContributions, DeletedContributionsPage, SpecialEmailUser, FileDuplicateSearchPage, SpecialListFiles, MovePageForm, SpecialPageLanguage, SpecialPagesWithProp, SpecialPrefixindex, SpecialRecentChangesLinked, SpecialUnblock, SpecialUndelete, UserrightsPage, and SpecialWhatLinksHere.

Definition at line 420 of file SpecialPage.php.

References $limit, getSubpagesForPrefixSearch(), and prefixSearchArray().

◆ requireLogin()

SpecialPage::requireLogin (   $reasonMsg = 'exception-nologin-text',
  $titleMsg = 'exception-nologin' 
)

If the user is not logged in, throws UserNotLoggedIn error.

The user will be redirected to Special:Userlogin with the given message as an error on the form.

Since
1.23
Parameters
string$reasonMsg[optional] Message key to be displayed on login page
string$titleMsg[optional] Passed on to UserNotLoggedIn constructor
Exceptions
UserNotLoggedIn

Definition at line 336 of file SpecialPage.php.

References getUser().

Referenced by SpecialChangeEmail\checkExecutePermissions(), EmailConfirmation\execute(), SpecialEditWatchlist\execute(), SpecialBotPasswords\execute(), SpecialPreferences\execute(), SpecialResetTokens\execute(), and SpecialWatchlist\execute().

◆ run()

SpecialPage::run (   $subPage)
final

Entry point.

Since
1.20
Parameters
string | null$subPage

Definition at line 505 of file SpecialPage.php.

References afterExecute(), beforeExecute(), and execute().

◆ setContext()

SpecialPage::setContext (   $context)

Sets the context this SpecialPage is executed in.

Parameters
IContextSource$context
Since
1.18

Definition at line 638 of file SpecialPage.php.

References $context.

Referenced by SkinTemplate\buildNavUrls(), ApiQueryUsers\execute(), and LoginSignupSpecialPage\setSessionUserForCurrentRequest().

◆ setHeaders()

SpecialPage::setHeaders ( )

Sets headers - this should be called from the execute() method of all derived classes!

Reimplemented in SpecialUserLogin.

Definition at line 484 of file SpecialPage.php.

References $out, getConfig(), getDescription(), getOutput(), and getRobotPolicy().

Referenced by EmailConfirmation\execute(), EmailInvalidation\execute(), SpecialBookSources\execute(), SpecialEditWatchlist\execute(), FormSpecialPage\execute(), QueryPage\execute(), SpecialActiveUsers\execute(), SpecialAllMessages\execute(), SpecialAllPages\execute(), SpecialApiSandbox\execute(), SpecialBlankpage\execute(), SpecialBlockList\execute(), SpecialCategories\execute(), SpecialComparePages\execute(), SpecialContributions\execute(), DeletedContributionsPage\execute(), SpecialEditTags\execute(), SpecialEmailUser\execute(), SpecialExport\execute(), FileDuplicateSearchPage\execute(), SpecialGoToInterwiki\execute(), SpecialImport\execute(), SpecialJavaScriptTest\execute(), LinkSearchPage\execute(), SpecialListFiles\execute(), SpecialListGrants\execute(), SpecialListGroupRights\execute(), SpecialListUsers\execute(), SpecialLog\execute(), SpecialMergeHistory\execute(), MIMEsearchPage\execute(), MovePageForm\execute(), SpecialNewFiles\execute(), SpecialNewpages\execute(), SpecialPagesWithProp\execute(), SpecialPreferences\execute(), SpecialPrefixindex\execute(), SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), RandomPage\execute(), SpecialRevisionDelete\execute(), SpecialSearch\execute(), SpecialSpecialpages\execute(), SpecialStatistics\execute(), SpecialTags\execute(), SpecialTrackingCategories\execute(), SpecialUnblock\execute(), SpecialUndelete\execute(), SpecialUpload\execute(), SpecialUserLogout\execute(), UserrightsPage\execute(), SpecialVersion\execute(), SpecialWhatLinksHere\execute(), ChangesListSpecialPage\execute(), LoginSignupSpecialPage\execute(), execute(), SpecialChangeCredentials\execute(), SpecialExpandTemplates\execute(), SpecialLinkAccounts\execute(), SpecialUnlinkAccounts\execute(), and SpecialUploadStash\showUploads().

◆ setLinkRenderer()

SpecialPage::setLinkRenderer ( LinkRenderer  $linkRenderer)
Since
1.28
Parameters
\\MediaWiki\\Linker\\LinkRenderer$linkRenderer

Definition at line 868 of file SpecialPage.php.

References $linkRenderer.

◆ setListed()

SpecialPage::setListed (   $listed)

Set whether this page is listed in Special:Specialpages, at run-time.

Since
1.3
Parameters
bool$listed
Returns
bool

Definition at line 178 of file SpecialPage.php.

References wfSetVar().

◆ userCanExecute()

SpecialPage::userCanExecute ( User  $user)

Checks if the given user (identified by an object) can execute this special page (as defined by $mRestriction).

Can be overridden by sub- classes with more complicated permissions schemes.

Parameters
User$userThe user to check
Returns
bool Does the user have permission to view the page?

Reimplemented in SpecialCreateAccount, SpecialPasswordReset, SpecialUndelete, SpecialUpload, and UserrightsPage.

Definition at line 287 of file SpecialPage.php.

References $user.

Referenced by checkPermissions(), QueryPage\execute(), and DeletedContributionsPage\execute().

◆ useTransactionalTimeLimit()

SpecialPage::useTransactionalTimeLimit ( )
protected

Member Data Documentation

◆ $linkRenderer

◆ $mContext

IContextSource SpecialPage::$mContext
protected

Current request context.

Definition at line 61 of file SpecialPage.php.

Referenced by getContext().

◆ $mIncludable

SpecialPage::$mIncludable
protected

Definition at line 55 of file SpecialPage.php.

Referenced by isIncludable().

◆ $mIncluding

SpecialPage::$mIncluding
protected

Definition at line 52 of file SpecialPage.php.

◆ $mListed

SpecialPage::$mListed
private

Definition at line 49 of file SpecialPage.php.

Referenced by isListed().

◆ $mLocalName

SpecialPage::$mLocalName
private

Definition at line 42 of file SpecialPage.php.

Referenced by getLocalName().

◆ $mName

SpecialPage::$mName
protected

Definition at line 39 of file SpecialPage.php.

Referenced by SpecialCachedPage\getCacheKey(), and getName().

◆ $mRestriction

SpecialPage::$mRestriction
protected

Definition at line 46 of file SpecialPage.php.

Referenced by getRestriction().


The documentation for this class was generated from the following file: