MediaWiki  1.23.8
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='default', $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. More...
 
 checkPermissions ()
 Checks if userCanExecute, and if not throws a PermissionsError. More...
 
 checkReadOnly ()
 If the wiki is currently in readonly mode, throws a ReadOnlyError. More...
 
 displayRestrictionError ()
 Output an error message telling the user what access level they have to have. More...
 
 execute ( $subPage)
 Default execute method Checks user permissions, calls the function given in mFunction. More...
 
 getContext ()
 Gets the context this SpecialPage is executed in. More...
 
 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. More...
 
 getFile ()
 Get the file which will be included by SpecialPage::execute() if your extension is still stuck in the past and hasn't overridden the execute() method. More...
 
 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. More...
 
 getFullTitle ()
 Return the full title, including $par. More...
 
 getLang ()
 Shortcut to get user's language. More...
 
 getLanguage ()
 Shortcut to get user's language. More...
 
 getLocalName ()
 Get the localised name of the special page. More...
 
 getName ()
 Get the name of this Special Page. More...
 
 getOutput ()
 Get the OutputPage being used for this instance. More...
 
 getPageTitle ( $subpage=false)
 Get a self-referential title object. More...
 
 getRequest ()
 Get the WebRequest being used for this instance. More...
 
 getRestriction ()
 Get the permission that a user must have to execute this page. More...
 
 getSkin ()
 Shortcut to get the skin being used for this instance. More...
 
 getTitle ( $subpage=false)
 Get a self-referential title object. More...
 
 getUser ()
 Shortcut to get the User executing this instance. More...
 
 including ( $x=null)
 Whether the special page is being evaluated via transclusion. More...
 
 isCached ()
 Is this page cached? Expensive pages are cached or disabled in miser mode. More...
 
 isExpensive ()
 Is this page expensive (for some definition of expensive)? Expensive pages are disabled or cached in miser mode. More...
 
 isIncludable ()
 Whether it's allowed to transclude the special page via {{Special:Foo/params}}. More...
 
 isListed ()
 Whether this special page is listed in Special:SpecialPages. More...
 
 isRestricted ()
 Can be overridden by subclasses with more complicated permissions schemes. More...
 
 listed ( $x=null)
 Get or set whether this special page is listed in Special:SpecialPages. More...
 
 msg ()
 Wrapper around wfMessage that sets the current context. More...
 
 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. More...
 
 requireLogin ( $reasonMsg=null, $titleMsg=null)
 If the user is not logged in, throws UserNotLoggedIn error. More...
 
 run ( $subPage)
 Entry point. More...
 
 setContext ( $context)
 Sets the context this SpecialPage is executed in. More...
 
 setHeaders ()
 Sets headers - this should be called from the execute() method of all derived classes! More...
 
 setListed ( $listed)
 Set whether this page is listed in Special:Specialpages, at run-time. More...
 
 userCanExecute (User $user)
 Checks if the given user (identified by an object) can execute this special page (as defined by $mRestriction). More...
 

Static Public Member Functions

static getSafeTitleFor ( $name, $subpage=false)
 Get a localised Title object for a page name with a possibly unvalidated subpage. More...
 
static getTitleFor ( $name, $subpage=false, $fragment='')
 Get a localised Title object for a specified special page name. More...
 

Protected Member Functions

 addFeedLinks ( $params)
 Adds RSS/atom links. More...
 
 afterExecute ( $subPage)
 Gets called after. More...
 
 beforeExecute ( $subPage)
 Gets called before. More...
 
 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'. More...
 
 getRobotPolicy ()
 Return the robot policy. More...
 

Protected Attributes

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

Private Attributes

 $mFile
 
 $mFunction
 
 $mListed
 
 $mLocalName
 
 $mRestriction
 

Detailed Description

Parent class for all special pages.

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

Todo:
Turn this into a real ContextSource

Definition at line 33 of file SpecialPage.php.

Constructor & Destructor Documentation

◆ __construct()

SpecialPage::__construct (   $name = '',
  $restriction = '',
  $listed = true,
  $function = false,
  $file = 'default',
  $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$functionFunction called by execute(). By default it is constructed from $name
string$fileFile which is included by execute(). It is also constructed from $name by default
bool$includableWhether the page can be included in normal pages

Definition at line 115 of file SpecialPage.php.

References $file, and $name.

Member Function Documentation

◆ addFeedLinks()

SpecialPage::addFeedLinks (   $params)
protected

Adds RSS/atom links.

Parameters
array$params

Definition at line 630 of file SpecialPage.php.

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

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

◆ 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 410 of file SpecialPage.php.

Referenced by run().

◆ beforeExecute()

SpecialPage::beforeExecute (   $subPage)
protected

Gets called before.

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

Definition at line 399 of file SpecialPage.php.

Referenced by run().

◆ checkPermissions()

◆ checkReadOnly()

◆ displayRestrictionError()

SpecialPage::displayRestrictionError ( )

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

Exceptions
PermissionsError

Definition at line 276 of file SpecialPage.php.

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

◆ execute()

SpecialPage::execute (   $subPage)

Default execute method Checks user permissions, calls the function given in mFunction.

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

Parameters
string | null$subPage

Reimplemented in LoginForm, SpecialUploadStash, SpecialExpandTemplates, ChangesListSpecialPage, SpecialRecentChanges, SpecialWatchlist, SpecialRunJobs, SpecialUndelete, QueryPage, SpecialListUsers, DeletedContributionsPage, SpecialActiveUsers, SpecialUpload, FormSpecialPage, SpecialNewpages, MIMEsearchPage, SpecialRevisionDelete, SpecialEmailUser, FileDuplicateSearchPage, SpecialMergeHistory, SpecialAllpages, LinkSearchPage, UserrightsPage, SpecialSearch, SpecialRandomInCategory, SpecialCategories, SpecialResetTokens, SpecialChangeEmail, RandomPage, SpecialImport, SpecialVersion, SpecialPrefixindex, SpecialComparePages, SpecialAllmessages, SpecialChangePassword, SpecialLog, MovePageForm, SpecialBlockList, SpecialJavaScriptTest, SpecialListGroupRights, SpecialPagesWithProp, SpecialWhatLinksHere, SpecialExport, SpecialTrackingCategories, SpecialUnblock, WantedPagesPage, SpecialProtectedpages, SpecialStatistics, SpecialTags, SpecialProtectedtitles, WithoutInterwikiPage, RedirectSpecialPage, SpecialContributions, SpecialBlankpage, SpecialSpecialpages, SpecialPreferences, SpecialUserlogout, SpecialListFiles, SpecialNewFiles, SpecialEditWatchlist, SpecialBookSources, EmailInvalidation, and EmailConfirmation.

Definition at line 422 of file SpecialPage.php.

References $mFile, $mFunction, checkPermissions(), outputHeader(), and setHeaders().

Referenced by run().

◆ getContext()

SpecialPage::getContext ( )

Gets the context this SpecialPage is executed in.

Returns
IContextSource|RequestContext
Since
1.18

Definition at line 508 of file SpecialPage.php.

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

Referenced by LoginForm\addNewAccount(), LoginForm\authenticateUserData(), SpecialRecentChanges\doHeader(), SpecialImport\doImport(), SpecialListFiles\execute(), SpecialNewFiles\execute(), SpecialPreferences\execute(), SpecialContributions\execute(), SpecialUnblock\execute(), SpecialBlockList\execute(), SpecialPagesWithProp\execute(), SpecialComparePages\execute(), SpecialExpandTemplates\execute(), SpecialCategories\execute(), SpecialAllpages\execute(), SpecialEmailUser\execute(), SpecialActiveUsers\execute(), DeletedContributionsPage\execute(), SpecialListUsers\execute(), PageQueryPage\formatResult(), PopularPagesPage\formatResult(), FewestrevisionsPage\formatResult(), UnwatchedpagesPage\formatResult(), MostlinkedCategoriesPage\formatResult(), ShortPagesPage\formatResult(), MostcategoriesPage\formatResult(), MostinterwikisPage\formatResult(), MostlinkedTemplatesPage\formatResult(), MostlinkedPage\formatResult(), FileDuplicateSearchPage\formatResult(), SpecialProtectedtitles\formatRow(), ContribsPager\formatRow(), SpecialExpandTemplates\generateHtml(), SpecialEditWatchlist\getClearForm(), SpecialUpload\getDupeWarning(), FormSpecialPage\getForm(), getFullTitle(), getLanguage(), SpecialRevisionDelete\getList(), SpecialEditWatchlist\getNormalForm(), getOutput(), SpecialEditWatchlist\getRawForm(), getRequest(), getSkin(), DeletedContributionsPage\getSubTitle(), SpecialUpload\getUploadForm(), getUser(), SpecialCategories\initServices(), LinkSearchPage\initServices(), msg(), SpecialChangePassword\onSuccess(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), ImageQueryPage\outputResults(), LoginForm\processLogin(), LoginForm\resetLoginForm(), SpecialWatchlist\setTopText(), SpecialLog\show(), SpecialAllpages\showChunk(), SpecialUndelete\showDiff(), SpecialUndelete\showList(), SpecialPreferences\showResetForm(), SpecialUploadStash\showUploads(), and SpecialPreferences\submitReset().

◆ 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 LoginForm, and SpecialEmailUser.

Definition at line 466 of file SpecialPage.php.

References msg().

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

◆ getFile()

SpecialPage::getFile ( )

Get the file which will be included by SpecialPage::execute() if your extension is still stuck in the past and hasn't overridden the execute() method.

No modern code should want or need to know this.

Returns
string
Deprecated:
since 1.18

Definition at line 158 of file SpecialPage.php.

References $mFile, and wfDeprecated().

◆ 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 650 of file SpecialPage.php.

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

◆ getFullTitle()

SpecialPage::getFullTitle ( )

Return the full title, including $par.

Returns
Title
Since
1.18

Definition at line 588 of file SpecialPage.php.

References getContext().

Referenced by SpecialRevisionDelete\execute(), and LoginForm\execute().

◆ 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 SpecialUndelete, LoginForm, SpecialSearch, SpecialVersion, SpecialBlock, MovePageForm, UserrightsPage, SpecialUpload, SpecialContributions, SpecialRevisionDelete, SpecialAllpages, SpecialExport, DeletedContributionsPage, SpecialNewpages, SpecialWhatLinksHere, ChangesListSpecialPage, SpecialMergeHistory, SpecialListUsers, SpecialImport, SpecialEmailUser, SpecialPasswordReset, SpecialStatistics, SpecialChangePassword, SpecialPrefixindex, SpecialListGroupRights, LinkSearchPage, SpecialRandomInCategory, SpecialProtectedpages, SpecialExpandTemplates, SpecialChangeEmail, SpecialActiveUsers, SpecialRedirect, SpecialLog, FileDuplicateSearchPage, SpecialUnblock, SpecialBlockList, SpecialProtectedtitles, SpecialBookSources, MIMEsearchPage, DoubleRedirectsPage, SpecialJavaScriptTest, SpecialComparePages, RandomPage, BrokenRedirectsPage, SpecialPagesWithProp, SpecialResetTokens, ListredirectsPage, MostlinkedTemplatesPage, MostlinkedPage, SpecialTrackingCategories, WantedCategoriesPage, MostinterwikisPage, ShortPagesPage, MostcategoriesPage, SpecialTags, ListDuplicatedFilesPage, WithoutInterwikiPage, FewestrevisionsPage, SpecialLockdb, MostlinkedCategoriesPage, UnwatchedpagesPage, LonelyPagesPage, SpecialPreferences, WantedPagesPage, UnusedtemplatesPage, WantedFilesPage, DeadendPagesPage, SpecialCategories, SpecialUnlockdb, PopularPagesPage, AncientPagesPage, UnusedimagesPage, UncategorizedPagesPage, SpecialAllmessages, UnusedCategoriesPage, SpecialUserlogout, MostimagesPage, SpecialListFiles, UncategorizedImagesPage, WantedTemplatesPage, SpecialNewFiles, SpecialFilepath, SpecialCreateAccount, LongPagesPage, and MostrevisionsPage.

Definition at line 686 of file SpecialPage.php.

Referenced by getFinalGroupName().

◆ getLang()

SpecialPage::getLang ( )

Shortcut to get user's language.

Deprecated:
since 1.19 Use getLanguage instead
Returns
Language
Since
1.18

Definition at line 566 of file SpecialPage.php.

References getLanguage(), and wfDeprecated().

◆ getLanguage()

SpecialPage::getLanguage ( )

Shortcut to get user's language.

Returns
Language
Since
1.19

Definition at line 578 of file SpecialPage.php.

References getContext().

Referenced by SpecialChangeEmail\attemptChange(), SpecialChangePassword\attemptReset(), SpecialEditWatchlist\buildRemoveLine(), SpecialVersion\compare(), SpecialContributions\contributionsSub(), SpecialWatchlist\cutoffLinks(), SpecialWatchlist\daysLink(), SpecialUndelete\diffHeader(), SpecialWatchlist\doHeader(), SpecialTrackingCategories\execute(), SpecialBlockList\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialActiveUsers\execute(), QueryPage\execute(), SpecialNewpages\filterLinks(), SpecialUndelete\formatFileRow(), SpecialListGroupRights\formatPermissions(), PopularPagesPage\formatResult(), AncientPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), FewestrevisionsPage\formatResult(), UnwatchedpagesPage\formatResult(), MostlinkedCategoriesPage\formatResult(), ShortPagesPage\formatResult(), WantedCategoriesPage\formatResult(), MostcategoriesPage\formatResult(), MostinterwikisPage\formatResult(), BrokenRedirectsPage\formatResult(), MostlinkedTemplatesPage\formatResult(), ListredirectsPage\formatResult(), MostlinkedPage\formatResult(), DoubleRedirectsPage\formatResult(), SpecialPagesWithProp\formatResult(), MIMEsearchPage\formatResult(), FileDuplicateSearchPage\formatResult(), WantedQueryPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialProtectedtitles\formatRow(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), SpecialSearch\formHeader(), SpecialCachedPage\getCacheKey(), SpecialVersion\getCreditsForExtension(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), SpecialUndelete\getFileLink(), SpecialWhatLinksHere\getFilterPanel(), SpecialStatistics\getGroupStats(), getLang(), SpecialStatistics\getMostViewedPages(), SpecialEditWatchlist\getNormalForm(), SpecialStatistics\getOtherStats(), SpecialUndelete\getPageLink(), SpecialStatistics\getPageStats(), SpecialWhatLinksHere\getPrevNext(), DeletedContributionsPage\getSubTitle(), SpecialStatistics\getUserStats(), SpecialStatistics\getViewsStats(), SpecialWatchlist\hoursLink(), SpecialJavaScriptTest\initQUnitTesting(), SpecialWhatLinksHere\listItem(), SpecialVersion\listToText(), LoginForm\makeLanguageSelector(), LoginForm\makeLanguageSelectorLink(), SpecialRecentChanges\optionsPanel(), SpecialNewpages\parseParams(), LoginForm\processLogin(), SpecialUpload\processVerificationError(), SpecialAllpages\showChunk(), SpecialRevisionDelete\showConvenienceLinks(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialRevisionDelete\showForm(), SpecialSearch\showHit(), SpecialUndelete\showList(), EmailConfirmation\showRequestForm(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), MovePageForm\showSubpages(), and SpecialRevisionDelete\tryShowFile().

◆ getLocalName()

SpecialPage::getLocalName ( )

Get the localised name of the special page.

Returns
string

Definition at line 215 of file SpecialPage.php.

References $mLocalName, and SpecialPageFactory\getLocalNameFor().

◆ getName()

◆ getOutput()

SpecialPage::getOutput ( )

Get the OutputPage being used for this instance.

Returns
OutputPage
Since
1.18

Definition at line 535 of file SpecialPage.php.

References getContext().

Referenced by SpecialCachedPage\addCachedHTML(), addFeedLinks(), SpecialLog\addHeader(), ChangesListSpecialPage\addModules(), SpecialRecentChanges\addModules(), LoginForm\addNewAccount(), LoginForm\addNewAccountMailPassword(), SpecialRevisionDelete\addUsageText(), SpecialChangeEmail\attemptChange(), EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), SpecialContributions\contributionsSub(), LoginForm\cookieRedirectCheck(), SpecialRedirect\dispatch(), LoginForm\displaySuccessfulAction(), QueryPage\doFeed(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialImport\doImport(), SpecialRecentChangesLinked\doMainQuery(), LinkSearchPage\doQuery(), SpecialChangeEmail\doReturnTo(), MovePageForm\doSubmit(), UserrightsPage\editUserGroupsForm(), SpecialChangeEmail\error(), SpecialNewFiles\execute(), SpecialListFiles\execute(), SpecialUserlogout\execute(), SpecialPreferences\execute(), SpecialBlankpage\execute(), SpecialRunJobs\execute(), SpecialSpecialpages\execute(), SpecialContributions\execute(), RedirectSpecialPage\execute(), SpecialProtectedtitles\execute(), SpecialProtectedpages\execute(), SpecialStatistics\execute(), SpecialTags\execute(), SpecialExport\execute(), SpecialTrackingCategories\execute(), SpecialUnblock\execute(), SpecialWatchlist\execute(), SpecialRecentChanges\execute(), SpecialPagesWithProp\execute(), SpecialWhatLinksHere\execute(), SpecialJavaScriptTest\execute(), SpecialListGroupRights\execute(), SpecialBlockList\execute(), EmailConfirmation\execute(), SpecialAllmessages\execute(), SpecialChangePassword\execute(), SpecialExpandTemplates\execute(), SpecialBookSources\execute(), SpecialPrefixindex\execute(), SpecialVersion\execute(), RandomPage\execute(), SpecialChangeEmail\execute(), SpecialEditWatchlist\execute(), SpecialResetTokens\execute(), SpecialCategories\execute(), SpecialRandomInCategory\execute(), SpecialSearch\execute(), UserrightsPage\execute(), SpecialAllpages\execute(), LinkSearchPage\execute(), SpecialMergeHistory\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), SpecialRevisionDelete\execute(), MIMEsearchPage\execute(), SpecialNewpages\execute(), LoginForm\execute(), SpecialActiveUsers\execute(), DeletedContributionsPage\execute(), SpecialListUsers\execute(), QueryPage\execute(), SpecialUndelete\execute(), LoginForm\executeReturnTo(), SpecialRevisionDelete\failure(), SpecialNewpages\feed(), SpecialNewpages\form(), SpecialVersion\getCreditsForExtension(), DeletedContributionsPage\getSubTitle(), SpecialSearch\goResult(), SpecialJavaScriptTest\initQUnitTesting(), SpecialVersion\listAuthors(), LoginForm\mainLoginForm(), SpecialMergeHistory\merge(), SpecialCachedPage\onCacheInitialized(), SpecialChangePassword\onSubmit(), SpecialResetTokens\onSuccess(), SpecialUnlockdb\onSuccess(), SpecialLockdb\onSuccess(), SpecialChangePassword\onSuccess(), SpecialPasswordReset\onSuccess(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), outputHeader(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialSpecialpages\outputPageList(), SpecialUpload\processUpload(), setHeaders(), SpecialRecentChangesLinked\setTopText(), SpecialRecentChanges\setTopText(), SpecialWatchlist\setTopText(), SpecialSearch\setupPage(), SpecialLog\show(), SpecialAllpages\showChunk(), SpecialRevisionDelete\showConvenienceLinks(), SpecialSearch\showCreateLink(), SpecialUndelete\showDiff(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFile(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialChangeEmail\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialWhatLinksHere\showIndirectLinks(), FileDuplicateSearchPage\showList(), SpecialBlockList\showList(), SpecialBookSources\showList(), SpecialUndelete\showList(), MovePageForm\showLogFragment(), SpecialMergeHistory\showMergeForm(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUndelete\showSearchForm(), MovePageForm\showSubpages(), SpecialAllpages\showToplevel(), SpecialUploadStash\showUpload(), SpecialUpload\showUploadForm(), SpecialUploadStash\showUploads(), SpecialUpload\showViewDeletedLinks(), SpecialRevisionDelete\submit(), SpecialPreferences\submitReset(), SpecialRevisionDelete\success(), UserrightsPage\switchForm(), SpecialRevisionDelete\tryShowFile(), SpecialUndelete\undelete(), and SpecialUpload\unsaveUploadedFile().

◆ getPageTitle()

SpecialPage::getPageTitle (   $subpage = false)

Get a self-referential title object.

Parameters
string | bool$subpage
Returns
Title
Since
1.23

Definition at line 488 of file SpecialPage.php.

References getTitleFor().

Referenced by LoginForm\addNewAccount(), LoginForm\addNewAccountInternal(), SpecialWatchlist\daysLink(), SpecialUndelete\diffHeader(), SpecialRecentChanges\doHeader(), SpecialExport\execute(), SpecialWatchlist\execute(), SpecialWhatLinksHere\execute(), SpecialBlockList\execute(), SpecialJavaScriptTest\execute(), SpecialExpandTemplates\execute(), SpecialImport\execute(), SpecialRandomInCategory\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), MIMEsearchPage\execute(), QueryPage\execute(), SpecialNewpages\feed(), QueryPage\feedUrl(), SpecialNewpages\filterLinks(), SpecialNewpages\form(), SpecialUndelete\formatFileRow(), SpecialUndelete\formatRevisionRow(), SpecialEditWatchlist\getClearForm(), SpecialVersion\getCreditsForExtension(), SpecialJavaScriptTest\getFrameworkListHtml(), SpecialEditWatchlist\getNormalForm(), WithoutInterwikiPage\getPageHeader(), SpecialEditWatchlist\getRawForm(), UserrightsPage\getSuccessURL(), getTitle(), SpecialUpload\getUploadForm(), SpecialWatchlist\hoursLink(), SpecialVersion\listAuthors(), LoginForm\mainLoginForm(), SpecialBookSources\makeForm(), SpecialExpandTemplates\makeForm(), LoginForm\makeLanguageSelectorLink(), SpecialRecentChanges\makeOptionsLink(), SpecialSearch\makeSearchLink(), SpecialAllpages\namespaceForm(), SpecialPrefixindex\namespacePrefixForm(), requireLogin(), SpecialWatchlist\setTopText(), SpecialSearch\shortDialog(), SpecialAllpages\showChunk(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialChangeEmail\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialWatchlist\showHideLink(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialAllpages\showline(), SpecialUndelete\showList(), SpecialMergeHistory\showMergeForm(), SpecialProtectedpages\showOptions(), SpecialProtectedtitles\showOptions(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUndelete\showSearchForm(), SpecialAllpages\showToplevel(), SpecialUploadStash\showUploads(), SpecialPreferences\submitReset(), 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

Definition at line 525 of file SpecialPage.php.

References getContext().

Referenced by LoginForm\addNewAccountInternal(), SpecialBlock\alterForm(), SpecialPasswordReset\alterForm(), SpecialChangePassword\alterForm(), SpecialRevisionDelete\buildCheckBoxes(), SpecialChangePassword\checkExecutePermissions(), SpecialRedirect\dispatchFile(), SpecialImport\doImport(), SpecialChangeEmail\doReturnTo(), SpecialListFiles\execute(), SpecialUserlogout\execute(), SpecialPreferences\execute(), SpecialRunJobs\execute(), SpecialContributions\execute(), WithoutInterwikiPage\execute(), SpecialProtectedtitles\execute(), SpecialProtectedpages\execute(), SpecialExport\execute(), SpecialUnblock\execute(), SpecialWatchlist\execute(), SpecialRecentChanges\execute(), SpecialBlockList\execute(), SpecialWhatLinksHere\execute(), SpecialPagesWithProp\execute(), MovePageForm\execute(), SpecialLog\execute(), SpecialAllmessages\execute(), SpecialExpandTemplates\execute(), SpecialBookSources\execute(), SpecialPrefixindex\execute(), SpecialImport\execute(), RandomPage\execute(), SpecialChangeEmail\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), SpecialRandomInCategory\execute(), SpecialSearch\execute(), UserrightsPage\execute(), LinkSearchPage\execute(), SpecialAllpages\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), SpecialRevisionDelete\execute(), MIMEsearchPage\execute(), LoginForm\execute(), DeletedContributionsPage\execute(), QueryPage\execute(), SpecialRevisionDelete\extractBitParams(), SpecialWatchlist\fetchOptionsFromRequest(), ChangesListSpecialPage\fetchOptionsFromRequest(), FormSpecialPage\getForm(), SpecialChangePassword\getFormFields(), SpecialFilepath\getRedirect(), RedirectSpecialPage\getRedirectQuery(), LoginForm\hasSessionCookie(), SpecialVersion\IPInfo(), LoginForm\load(), SpecialSearch\load(), SpecialUpload\loadRequest(), SpecialUndelete\loadRequest(), SpecialMergeHistory\loadRequestParams(), LoginForm\mailPasswordInternal(), LoginForm\mainLoginForm(), SpecialExpandTemplates\makeForm(), SpecialBlock\maybeAlterFormDefaults(), SpecialPasswordReset\onSubmit(), SpecialChangePassword\onSubmit(), SpecialChangePassword\onSuccess(), LoginForm\processLogin(), UserrightsPage\saveUserGroups(), SpecialBlock\setParameter(), SpecialNewpages\setup(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFile(), SpecialChangeEmail\showForm(), SpecialRevisionDelete\showForm(), SpecialExpandTemplates\showHtmlPreview(), EmailConfirmation\showRequestForm(), SpecialCachedPage\startCache(), SpecialRevisionDelete\submit(), SpecialRevisionDelete\tryShowFile(), and LoginForm\userBlockedMessage().

◆ getRestriction()

SpecialPage::getRestriction ( )

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

Returns
string

Definition at line 147 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 599 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 87 of file SpecialPage.php.

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

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

◆ getSkin()

◆ getTitle()

SpecialPage::getTitle (   $subpage = false)

Get a self-referential title object.

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

Definition at line 477 of file SpecialPage.php.

References getPageTitle().

Referenced by SpecialUpload\getExistsWarning().

◆ getTitleFor()

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

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

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 74 of file SpecialPage.php.

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

Referenced by EnhancedChangesList\addCacheEntry(), EmailConfirmation\attemptConfirm(), Linker\blockLink(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SpecialEditWatchlist\buildRemoveLine(), SpecialEditWatchlist\buildTools(), WatchAction\checkCanExecute(), Title\checkReadPermissions(), LoginForm\cookieRedirectCheck(), DifferenceEngine\deletedLink(), SpecialTags\doTagRow(), Linker\emailLink(), TidyUpBug37714\execute(), ApiCreateAccount\execute(), SpecialUserlogout\execute(), SpecialWatchlist\execute(), ApiFeedContributions\execute(), SpecialListGroupRights\execute(), SpecialBlockList\execute(), ApiFeedWatchlist\execute(), SpecialResetTokens\execute(), SpecialEditWatchlist\execute(), UnusedtemplatesPage\formatResult(), ListDuplicatedFilesPage\formatResult(), DeletedContribsPager\formatRow(), BlockListPager\formatValue(), MoveLogFormatter\getActionLinks(), DeleteLogFormatter\getActionLinks(), LegacyLogFormatter\getActionLinks(), RevDel_FileItem\getApiData(), PreferencesForm\getButtons(), InfoAction\getContributors(), HistoryAction\getDescription(), RevDel_ArchiveItem\getDiffLink(), SpecialUpload\getExistsWarning(), ApiFeedRecentChanges\getFeedObject(), SpecialStatistics\getGroupStats(), OutputPage\getHeadLinksArray(), RevDel_LogItem\getHTML(), RevDel_FileItem\getLink(), RevDel_ArchivedFileItem\getLink(), RCCacheEntryFactory\getLogLink(), SearchEngine\getNearMatchInternal(), SpecialStatistics\getPageStats(), getPageTitle(), ManualLogEntry\getRecentChange(), SpecialMycontributions\getRedirect(), SpecialMyuploads\getRedirect(), SpecialAllMyUploads\getRedirect(), SpecialRedirectToSpecial\getRedirect(), SpecialLog\getRevisionButton(), RevDel_ArchiveItem\getRevisionLink(), Skin\getSearchLink(), LogEventsList\getShowHideLinks(), UploadStashFile\getSpecialUrl(), DeletedContributionsPage\getSubTitle(), AllmessagesTablePager\getTitle(), ImageListPager\getTitle(), SpecialPageFactory\getTitleForAlias(), Skin\getUndeleteLink(), ImagePage\getUploadUrl(), Linker\getUploadUrl(), SpecialStatistics\getUserStats(), CreditsAction\link(), MostlinkedPage\makeWlhLink(), MostlinkedTemplatesPage\makeWlhLink(), WantedQueryPage\makeWlhLink(), Linker\normaliseSpecialPage(), MarkpatrolledAction\onView(), ImagePage\openShowImage(), SpecialListGroupRights\outputNamespaceProtectionInfo(), InfoAction\pageInfo(), MediaWiki\parseTitle(), MediaWiki\performRequest(), SpecialBlock\postText(), SkinTemplate\prepareQuickTemplate(), Preferences\profilePreferences(), EnhancedChangesList\recentChangesBlockLine(), OldChangesList\recentChangesLine(), requireLogin(), Linker\revDeleteLink(), LogPage\saveContent(), SpecialRevisionDelete\showConvenienceLinks(), SpecialSearch\showHit(), LogEventsList\showOptions(), OutputPage\showPermissionsErrorPage(), SpecialSearch\showResults(), SpecialUpload\showViewDeletedLinks(), CoreParserFunctions\special(), Linker\specialLink(), RevDel_LogList\suggestTarget(), SpecialPageTest\testGetTitleFor(), SpecialPageTest\testGetTitleForWithWarning(), SpecialPageTest\testInvalidGetTitleFor(), ExtraParserTest\testTrackingCategorySpecial(), Linker\userLink(), and Linker\userToolLinks().

◆ getUser()

SpecialPage::getUser ( )

Shortcut to get the User executing this instance.

Returns
User
Since
1.18

Definition at line 545 of file SpecialPage.php.

References getContext().

Referenced by UserrightsPage\addLogEntry(), LoginForm\addNewAccount(), LoginForm\addNewAccountInternal(), SpecialRevisionDelete\addUsageText(), SpecialChangePassword\alterForm(), LoginForm\attemptAutoCreate(), EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), SpecialChangePassword\attemptReset(), LoginForm\authenticateUserData(), ChangesListSpecialPage\buildMainQueryConds(), UserrightsPage\changeableGroups(), checkPermissions(), SpecialEditWatchlist\cleanupWatchlist(), SpecialEditWatchlist\clearWatchlist(), SpecialWatchlist\countItems(), SpecialUndelete\diffHeader(), LoginForm\displaySuccessfulAction(), SpecialWatchlist\doHeader(), SpecialImport\doImport(), SpecialRecentChangesLinked\doMainQuery(), SpecialWatchlist\doMainQuery(), SpecialRecentChanges\doMainQuery(), UserrightsPage\doSaveUserGroups(), MovePageForm\doSubmit(), SpecialTags\doTagRow(), SpecialPreferences\execute(), SpecialUserlogout\execute(), SpecialContributions\execute(), SpecialWatchlist\execute(), EmailConfirmation\execute(), MovePageForm\execute(), SpecialLog\execute(), SpecialImport\execute(), SpecialChangeEmail\execute(), SpecialEditWatchlist\execute(), UserrightsPage\execute(), SpecialEmailUser\execute(), SpecialRevisionDelete\execute(), FormSpecialPage\execute(), SpecialUpload\execute(), DeletedContributionsPage\execute(), QueryPage\execute(), SpecialUndelete\execute(), UserrightsPage\fetchUser(), SpecialNewpages\filterLinks(), SpecialUndelete\formatFileRow(), UnwatchedpagesPage\formatResult(), BrokenRedirectsPage\formatResult(), FileDuplicateSearchPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialProtectedtitles\formatRow(), ContribsPager\formatRow(), SpecialRecentChanges\getDefaultOptions(), SpecialWatchlist\getDefaultOptions(), SpecialUndelete\getFileLink(), SpecialEmailUser\getFormFields(), SpecialPasswordReset\getFormFields(), SpecialChangePassword\getFormFields(), SpecialResetTokens\getFormFields(), SpecialBlock\getFormFields(), SpecialSpecialpages\getPageGroups(), SpecialUndelete\getPageLink(), SpecialMypage\getRedirect(), SpecialMytalk\getRedirect(), SpecialMycontributions\getRedirect(), SpecialMyuploads\getRedirect(), SpecialAllMyUploads\getRedirect(), SpecialLog\getRevisionButton(), DeletedContributionsPage\getSubTitle(), SpecialUpload\getWatchCheck(), SpecialEditWatchlist\getWatchlist(), SpecialEditWatchlist\getWatchlistInfo(), SpecialPasswordReset\isListed(), SpecialSearch\load(), SpecialUpload\loadRequest(), SpecialUndelete\loadRequest(), SpecialMergeHistory\loadRequestParams(), LoginForm\mailPasswordInternal(), LoginForm\mainLoginForm(), SpecialExpandTemplates\makeForm(), SpecialMergeHistory\merge(), SpecialLockdb\onSubmit(), SpecialResetTokens\onSubmit(), SpecialPasswordReset\onSubmit(), SpecialChangePassword\onSubmit(), SpecialChangePassword\onSuccess(), SpecialPasswordReset\onSuccess(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), SpecialWatchlist\outputFeedLinks(), SpecialNewpages\patrollable(), LoginForm\processLogin(), SpecialUpload\processUpload(), requireLogin(), SpecialWatchlist\setTopText(), SpecialNewpages\setup(), SpecialRevisionDelete\showConvenienceLinks(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialChangeEmail\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialSearch\showHit(), SpecialExpandTemplates\showHtmlPreview(), SpecialBlockList\showList(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialUndelete\showRevision(), SpecialUpload\showViewDeletedLinks(), SpecialRevisionDelete\submit(), SpecialEditWatchlist\submitClear(), SpecialEditWatchlist\submitRaw(), SpecialPreferences\submitReset(), LoginForm\successfulCreation(), LoginForm\successfulLogin(), SpecialRevisionDelete\tryShowFile(), SpecialUndelete\undelete(), SpecialEditWatchlist\unwatchTitles(), SpecialExport\userCanOverrideExportDepth(), and SpecialEditWatchlist\watchTitles().

◆ 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 244 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 WantedQueryPage, QueryPage, WithoutInterwikiPage, DeadendPagesPage, LonelyPagesPage, MostlinkedTemplatesPage, UncategorizedPagesPage, UncategorizedImagesPage, MostlinkedPage, UnwatchedpagesPage, ListDuplicatedFilesPage, MIMEsearchPage, MostcategoriesPage, MostimagesPage, MostinterwikisPage, UnusedtemplatesPage, BrokenRedirectsPage, ListredirectsPage, AncientPagesPage, DoubleRedirectsPage, FewestrevisionsPage, PopularPagesPage, UnusedimagesPage, and UnusedCategoriesPage.

Definition at line 231 of file SpecialPage.php.

◆ isIncludable()

SpecialPage::isIncludable ( )

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

Returns
bool

Reimplemented in SpecialRecentChanges, IncludableSpecialPage, and WantedPagesPage.

Definition at line 198 of file SpecialPage.php.

References $mIncludable.

◆ isListed()

SpecialPage::isListed ( )

Whether this special page is listed in Special:SpecialPages.

Since
r3583 (v1.3)
Returns
bool

Reimplemented in SpecialPasswordReset, SpecialResetTokens, SpecialChangeEmail, SpecialCreateAccount, and UnlistedSpecialPage.

Definition at line 170 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 UserrightsPage.

Definition at line 255 of file SpecialPage.php.

References User\groupHasPermission().

◆ 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 190 of file SpecialPage.php.

References wfSetVar().

Referenced by SpecialChangePassword\__construct().

◆ msg()

SpecialPage::msg ( )

Wrapper around wfMessage that sets the current context.

Returns
Message
See also
wfMessage

Definition at line 609 of file SpecialPage.php.

References array(), getContext(), and including().

Referenced by LoginForm\addNewAccount(), LoginForm\addNewAccountMailPassword(), SpecialUnlockdb\alterForm(), SpecialLockdb\alterForm(), SpecialPasswordReset\alterForm(), SpecialChangePassword\alterForm(), SpecialChangePassword\attemptReset(), SpecialRevisionDelete\buildCheckBoxes(), SpecialEditWatchlist\buildRemoveLine(), SpecialRecentChanges\categoryFilterForm(), SpecialComparePages\checkExistingRevision(), SpecialComparePages\checkExistingTitle(), SpecialWatchlist\cutoffLinks(), SpecialWatchlist\daysLink(), SpecialUndelete\diffHeader(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialRecentChangesLinked\doMainQuery(), MovePageForm\doSubmit(), SpecialTags\doTagRow(), SpecialUserlogout\execute(), SpecialContributions\execute(), SpecialStatistics\execute(), SpecialTags\execute(), SpecialTrackingCategories\execute(), SpecialUnblock\execute(), SpecialExport\execute(), SpecialListGroupRights\execute(), SpecialPagesWithProp\execute(), SpecialBlockList\execute(), SpecialWhatLinksHere\execute(), SpecialJavaScriptTest\execute(), SpecialPrefixindex\execute(), SpecialVersion\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), SpecialRandomInCategory\execute(), SpecialAllpages\execute(), LinkSearchPage\execute(), SpecialMergeHistory\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), MIMEsearchPage\execute(), DeletedContributionsPage\execute(), SpecialListUsers\execute(), QueryPage\execute(), SpecialUndelete\execute(), SpecialRevisionDelete\failure(), SpecialNewpages\feed(), QueryPage\feedDesc(), SpecialNewpages\feedItemDesc(), SpecialNewpages\filterLinks(), SpecialNewpages\form(), SpecialUndelete\formatFileRow(), SpecialListGroupRights\formatPermissions(), PopularPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), FewestrevisionsPage\formatResult(), UnwatchedpagesPage\formatResult(), MostlinkedCategoriesPage\formatResult(), ShortPagesPage\formatResult(), WantedCategoriesPage\formatResult(), MostcategoriesPage\formatResult(), ListDuplicatedFilesPage\formatResult(), MostinterwikisPage\formatResult(), BrokenRedirectsPage\formatResult(), MostlinkedPage\formatResult(), DoubleRedirectsPage\formatResult(), SpecialPagesWithProp\formatResult(), MIMEsearchPage\formatResult(), LinkSearchPage\formatResult(), WantedQueryPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialProtectedtitles\formatRow(), SpecialStatistics\formatRow(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), SpecialStatistics\formatRowHeader(), SpecialSearch\formHeader(), SpecialProtectedpages\getCascadeCheck(), MostimagesPage\getCellHtml(), SpecialEditWatchlist\getClearForm(), SpecialVersion\getCreditsForExtension(), SpecialEmailUser\getDescription(), LoginForm\getDescription(), getDescription(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), SpecialProtectedpages\getExpiryCheck(), SpecialVersion\getExtensionCredits(), SpecialRecentChangesLinked\getExtraOptions(), SpecialUndelete\getFileComment(), SpecialUndelete\getFileUser(), SpecialWhatLinksHere\getFilterPanel(), getFinalGroupName(), FormSpecialPage\getForm(), SpecialEmailUser\getFormFields(), SpecialChangePassword\getFormFields(), SpecialResetTokens\getFormFields(), SpecialBlock\getFormFields(), SpecialRedirect\getFormFields(), SpecialJavaScriptTest\getFrameworkListHtml(), SpecialStatistics\getGroupStats(), SpecialProtectedtitles\getLevelMenu(), SpecialProtectedpages\getLevelMenu(), SpecialStatistics\getMostViewedPages(), SpecialProtectedpages\getNamespaceMenu(), SpecialProtectedtitles\getNamespaceMenu(), SpecialEditWatchlist\getNormalForm(), RandomPage\getNsList(), SpecialStatistics\getOtherStats(), DeadendPagesPage\getPageHeader(), LonelyPagesPage\getPageHeader(), UnusedCategoriesPage\getPageHeader(), WantedFilesPage\getPageHeader(), WithoutInterwikiPage\getPageHeader(), DoubleRedirectsPage\getPageHeader(), BrokenRedirectsPage\getPageHeader(), UnusedimagesPage\getPageHeader(), UnusedtemplatesPage\getPageHeader(), SpecialStatistics\getPageStats(), SpecialVersion\getParserFunctionHooks(), SpecialVersion\getParserTags(), SpecialWhatLinksHere\getPrevNext(), SpecialEditWatchlist\getRawForm(), SpecialProtectedpages\getRedirectCheck(), SpecialLog\getRevisionButton(), SpecialProtectedpages\getSizeLimit(), DeletedContributionsPage\getSubTitle(), SpecialProtectedpages\getTypeMenu(), SpecialUpload\getUploadForm(), SpecialStatistics\getUserStats(), SpecialStatistics\getViewsStats(), SpecialVersion\getWgHooks(), UserrightsPage\groupCheckboxes(), SpecialJavaScriptTest\initQUnitTesting(), SpecialVersion\listAuthors(), SpecialWhatLinksHere\listItem(), LoginForm\mailPasswordInternal(), LoginForm\mainLoginForm(), SpecialBookSources\makeForm(), SpecialExpandTemplates\makeForm(), UserrightsPage\makeGroupNameList(), LoginForm\makeLanguageSelector(), SpecialExpandTemplates\makeOutput(), SpecialSearch\makeSearchLink(), MostlinkedTemplatesPage\makeWlhLink(), WantedQueryPage\makeWlhLink(), SpecialMergeHistory\merge(), SpecialRecentChanges\namespaceFilterForm(), SpecialAllpages\namespaceForm(), SpecialPrefixindex\namespacePrefixForm(), LoginForm\onCookieRedirectCheck(), SpecialLockdb\onSubmit(), SpecialPasswordReset\onSubmit(), SpecialUnlockdb\onSuccess(), SpecialLockdb\onSuccess(), SpecialVersion\openExtType(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), outputHeader(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialSearch\powerSearchBox(), SpecialMergeHistory\preCacheMessages(), SpecialChangeEmail\pretty(), LoginForm\processLogin(), SpecialUpload\processUpload(), SpecialUpload\processVerificationError(), requireLogin(), SpecialRecentChanges\setTopText(), SpecialWatchlist\setTopText(), SpecialSearch\setupPage(), SpecialSearch\shortDialog(), SpecialAllpages\showChunk(), SpecialRevisionDelete\showConvenienceLinks(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialChangeEmail\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialWatchlist\showHideLink(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialSearch\showHit(), SpecialExpandTemplates\showHtmlPreview(), SpecialSearch\showInterwiki(), SpecialSearch\showInterwikiHit(), SpecialAllpages\showline(), SpecialBlockList\showList(), SpecialBookSources\showList(), SpecialUndelete\showList(), SpecialMergeHistory\showMergeForm(), SpecialProtectedpages\showOptions(), SpecialProtectedtitles\showOptions(), SpecialPrefixindex\showPrefixChunk(), SpecialUpload\showRecoverableUploadError(), EmailConfirmation\showRequestForm(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUndelete\showSearchForm(), SpecialEditWatchlist\showTitles(), SpecialAllpages\showToplevel(), SpecialUpload\showUploadError(), SpecialUploadStash\showUploads(), SpecialUpload\showUploadWarning(), SpecialUpload\showViewDeletedLinks(), SpecialSearch\startsWithAll(), SpecialRevisionDelete\submit(), SpecialEditWatchlist\submitClear(), SpecialEditWatchlist\submitNormal(), SpecialEditWatchlist\submitRaw(), SpecialRevisionDelete\success(), LoginForm\successfulCreation(), LoginForm\successfulLogin(), UserrightsPage\switchForm(), SpecialRevisionDelete\tryShowFile(), SpecialUndelete\undelete(), LoginForm\userBlockedMessage(), SpecialEmailUser\userForm(), 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 443 of file SpecialPage.php.

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

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

◆ requireLogin()

SpecialPage::requireLogin (   $reasonMsg = null,
  $titleMsg = null 
)

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

Default error message includes a link to Special:Userlogin with properly set 'returnto' query parameter.

Since
1.23
Parameters
string | Message$reasonMsg[optional] Passed on to UserNotLoggedIn constructor. Strings will be used as message keys. If a string is given, the message will also receive a formatted login link (generated using the 'loginreqlink' message) as first parameter. If a Message is given, it will be passed on verbatim.
string | Message$titleMsg[optional] Passed on to UserNotLoggedIn constructor. Strings will be used as message keys.
Exceptions
UserNotLoggedIn

Definition at line 321 of file SpecialPage.php.

References array(), getPageTitle(), getTitleFor(), getUser(), Linker\linkKnown(), and msg().

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

◆ run()

SpecialPage::run (   $subPage)
final

Entry point.

Since
1.20
Parameters
string | null$subPage

Definition at line 366 of file SpecialPage.php.

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

◆ setContext()

SpecialPage::setContext (   $context)

Sets the context this SpecialPage is executed in.

Parameters
IContextSource$context
Since
1.18

Definition at line 498 of file SpecialPage.php.

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

◆ setHeaders()

SpecialPage::setHeaders ( )

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

Definition at line 352 of file SpecialPage.php.

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

Referenced by SpecialListFiles\execute(), SpecialNewFiles\execute(), SpecialPreferences\execute(), SpecialUserlogout\execute(), SpecialSpecialpages\execute(), SpecialBlankpage\execute(), SpecialContributions\execute(), SpecialProtectedtitles\execute(), SpecialProtectedpages\execute(), SpecialStatistics\execute(), SpecialTags\execute(), SpecialExport\execute(), SpecialTrackingCategories\execute(), SpecialUnblock\execute(), ChangesListSpecialPage\execute(), SpecialBlockList\execute(), SpecialPagesWithProp\execute(), EmailConfirmation\execute(), SpecialJavaScriptTest\execute(), SpecialListGroupRights\execute(), SpecialWhatLinksHere\execute(), MovePageForm\execute(), SpecialAllmessages\execute(), SpecialLog\execute(), SpecialComparePages\execute(), SpecialExpandTemplates\execute(), SpecialBookSources\execute(), SpecialPrefixindex\execute(), SpecialImport\execute(), SpecialVersion\execute(), RandomPage\execute(), SpecialChangeEmail\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), SpecialRandomInCategory\execute(), SpecialSearch\execute(), UserrightsPage\execute(), LinkSearchPage\execute(), SpecialAllpages\execute(), SpecialMergeHistory\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), SpecialRevisionDelete\execute(), MIMEsearchPage\execute(), SpecialNewpages\execute(), FormSpecialPage\execute(), SpecialUpload\execute(), EmailInvalidation\execute(), LoginForm\execute(), SpecialActiveUsers\execute(), DeletedContributionsPage\execute(), SpecialListUsers\execute(), execute(), QueryPage\execute(), SpecialUndelete\execute(), and SpecialUploadStash\showUploads().

◆ 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 180 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 SpecialUpload, SpecialPasswordReset, and UserrightsPage.

Definition at line 268 of file SpecialPage.php.

References $user.

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

Member Data Documentation

◆ $mContext

IContextSource SpecialPage::$mContext
protected

Current request context.

Definition at line 63 of file SpecialPage.php.

Referenced by getContext().

◆ $mFile

SpecialPage::$mFile
private

Definition at line 52 of file SpecialPage.php.

Referenced by execute(), and getFile().

◆ $mFunction

SpecialPage::$mFunction
private

Definition at line 49 of file SpecialPage.php.

Referenced by execute().

◆ $mIncludable

SpecialPage::$mIncludable
protected

Definition at line 58 of file SpecialPage.php.

Referenced by isIncludable().

◆ $mIncluding

SpecialPage::$mIncluding
protected

Definition at line 55 of file SpecialPage.php.

◆ $mListed

SpecialPage::$mListed
private

Definition at line 46 of file SpecialPage.php.

Referenced by isListed().

◆ $mLocalName

SpecialPage::$mLocalName
private

Definition at line 39 of file SpecialPage.php.

Referenced by getLocalName().

◆ $mName

SpecialPage::$mName
protected

Definition at line 36 of file SpecialPage.php.

Referenced by getName().

◆ $mRestriction

SpecialPage::$mRestriction
private

Definition at line 43 of file SpecialPage.php.

Referenced by getRestriction().


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