MediaWiki  master
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. 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. More...
 
 getConfig ()
 Shortcut to get main config object. 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...
 
 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...
 
 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...
 
 prefixSearchSubpages ($search, $limit, $offset)
 Return an array of subpages beginning with $search that this special page will accept. More...
 
 requireLogin ($reasonMsg= 'exception-nologin-text', $titleMsg= 'exception-nologin')
 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...
 
 getSubpagesForPrefixSearch ()
 Return an array of subpages that this special page will accept for prefix searches. More...
 

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). More...
 

Protected Attributes

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

Private Attributes

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

Constructor & Destructor Documentation

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

References $name.

Member Function Documentation

SpecialPage::addFeedLinks (   $params)
protected

Adds RSS/atom links.

Parameters
array$params

Definition at line 623 of file SpecialPage.php.

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

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

SpecialPage::afterExecute (   $subPage)
protected

Gets called after.

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

Definition at line 414 of file SpecialPage.php.

Referenced by run().

SpecialPage::beforeExecute (   $subPage)
protected

Gets called before.

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

Definition at line 403 of file SpecialPage.php.

Referenced by run().

SpecialPage::displayRestrictionError ( )

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

Exceptions
PermissionsError

Definition at line 243 of file SpecialPage.php.

Referenced by checkPermissions(), DeletedContributionsPage\execute(), and QueryPage\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

Definition at line 426 of file SpecialPage.php.

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

Referenced by run().

SpecialPage::getConfig ( )

Shortcut to get main config object.

Returns
Config
Since
1.24

Definition at line 571 of file SpecialPage.php.

References getContext().

Referenced by addFeedLinks(), SpecialPasswordReset\alterForm(), SpecialChangeEmail\attemptChange(), SpecialChangePassword\attemptReset(), SpecialPasswordReset\canChangePassword(), SpecialUnlockdb\checkExecutePermissions(), SpecialLockdb\checkExecutePermissions(), QueryPage\doFeed(), SpecialImport\doImport(), SpecialWatchlist\doMainQuery(), SpecialRecentChanges\doMainQuery(), MovePageForm\doSubmit(), SpecialLog\execute(), SpecialRunJobs\execute(), SpecialStatistics\execute(), SpecialExport\execute(), SpecialWatchlist\execute(), SpecialListGroupRights\execute(), SpecialWhatLinksHere\execute(), SpecialAllMessages\execute(), SpecialExpandTemplates\execute(), LinkSearchPage\execute(), SpecialEmailUser\execute(), SpecialActiveUsers\execute(), DeletedContributionsPage\execute(), QueryPage\execute(), SpecialNewpages\feed(), SpecialNewpages\feedTitle(), QueryPage\feedTitle(), UserrightsPage\fetchUser(), SpecialMyLanguage\findTitle(), SpecialRecentChanges\getExtraOptions(), SpecialRecentChanges\getFeedQuery(), getFinalGroupName(), SpecialPageLanguage\getFormFields(), SpecialPasswordReset\getFormFields(), SpecialChangeEmail\getFormFields(), SpecialChangePassword\getFormFields(), SpecialStatistics\getGroupStats(), SpecialProtectedtitles\getLevelMenu(), SpecialProtectedpages\getLevelMenu(), SpecialImport\getMappingFormPart(), SpecialStatistics\getPageStats(), UnusedimagesPage\getQueryInfo(), WantedPagesPage\getQueryInfo(), LinkSearchPage\getQueryInfo(), SpecialLog\getSubpagesForPrefixSearch(), SpecialResetTokens\getTokensList(), SpecialStatistics\getUserStats(), QueryPage\isCached(), QueryPage\isExpensive(), LinkSearchPage\linkParameters(), LoginForm\mainLoginForm(), SpecialAllPages\namespaceForm(), SpecialPrefixindex\namespacePrefixForm(), SpecialUnlockdb\onSubmit(), SpecialLockdb\onSubmit(), SpecialPasswordReset\onSubmit(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialUploadStash\outputRemoteScaledThumb(), SpecialUploadStash\outputThumbFromStash(), SpecialLog\parseParams(), SpecialTrackingCategories\prepareTrackingCategoriesData(), SpecialUpload\processUpload(), SpecialUpload\processVerificationError(), setHeaders(), SpecialWatchlist\setTopText(), MovePageForm\showForm(), SpecialImport\showForm(), SpecialUndelete\showHistory(), SpecialExpandTemplates\showHtmlPreview(), SpecialWhatLinksHere\showIndirectLinks(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUndelete\undelete(), and SpecialExport\validateLinkDepth().

SpecialPage::getContext ( )

Gets the context this SpecialPage is executed in.

Returns
IContextSource|RequestContext
Since
1.18

Definition at line 505 of file SpecialPage.php.

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

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

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

Definition at line 463 of file SpecialPage.php.

References msg().

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

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

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

SpecialPage::getFullTitle ( )

Return the full title, including $par.

Returns
Title
Since
1.18

Definition at line 581 of file SpecialPage.php.

References getContext().

Referenced by LoginForm\execute().

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

Definition at line 677 of file SpecialPage.php.

Referenced by getFinalGroupName().

SpecialPage::getLanguage ( )

Shortcut to get user's language.

Returns
Language
Since
1.19

Definition at line 562 of file SpecialPage.php.

References getContext().

Referenced by SpecialChangeEmail\attemptChange(), SpecialChangePassword\attemptReset(), SpecialEditTags\buildCheckBoxes(), SpecialEditWatchlist\buildRemoveLine(), SpecialVersion\compare(), SpecialContributions\contributionsSub(), SpecialWatchlist\cutoffLinks(), SpecialWatchlist\daysLink(), SpecialUndelete\diffHeader(), SpecialWatchlist\doHeader(), SpecialTags\doTagRow(), SpecialBlockList\execute(), SpecialTrackingCategories\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialActiveUsers\execute(), QueryPage\execute(), SpecialJavaScriptTest\exportQUnit(), SpecialNewpages\filterLinks(), SpecialMyLanguage\findTitle(), SpecialUndelete\formatFileRow(), SpecialListGroupRights\formatPermissions(), AncientPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), FewestrevisionsPage\formatResult(), WantedQueryPage\formatResult(), MostlinkedCategoriesPage\formatResult(), UnwatchedpagesPage\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(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialProtectedtitles\formatRow(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), SpecialCachedPage\getCacheKey(), SpecialVersion\getCreditsForExtension(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), MediaStatisticsPage\getExtensionList(), SpecialUndelete\getFileLink(), SpecialWhatLinksHere\getFilterPanel(), SpecialPageLanguage\getFormFields(), SpecialStatistics\getGroupStats(), SpecialEditWatchlist\getNormalForm(), SpecialStatistics\getOtherStats(), SpecialUndelete\getPageLink(), SpecialStatistics\getPageStats(), SpecialWhatLinksHere\getPrevNext(), DeletedContributionsPage\getSubTitle(), SpecialStatistics\getUserStats(), SpecialWatchlist\hoursLink(), SpecialWhatLinksHere\listItem(), SpecialVersion\listToText(), LoginForm\makeLanguageSelector(), LoginForm\makeLanguageSelectorLink(), SpecialRecentChanges\optionsPanel(), SpecialNewpages\parseParams(), LoginForm\processLogin(), 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\showSubpages(), and SpecialRevisionDelete\tryShowFile().

SpecialPage::getLocalName ( )

Get the localised name of the special page.

Returns
string

Definition at line 182 of file SpecialPage.php.

References $mLocalName, and SpecialPageFactory\getLocalNameFor().

SpecialPage::getOutput ( )

Get the OutputPage being used for this instance.

Returns
OutputPage
Since
1.18

Definition at line 532 of file SpecialPage.php.

References getContext().

Referenced by SpecialCachedPage\addCachedHTML(), addFeedLinks(), SpecialLog\addHeader(), ChangesListSpecialPage\addModules(), SpecialRecentChanges\addModules(), LoginForm\addNewAccount(), LoginForm\addNewAccountMailPassword(), SpecialRevisionDelete\addUsageText(), SpecialBlock\alterForm(), SpecialPageLanguage\alterForm(), EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), SpecialContributions\contributionsSub(), LoginForm\cookieRedirectCheck(), SpecialRedirect\dispatch(), LoginForm\displaySuccessfulAction(), QueryPage\doFeed(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialImport\doImport(), SpecialRecentChangesLinked\doMainQuery(), MovePageForm\doSubmit(), UserrightsPage\editUserGroupsForm(), SpecialNewFiles\execute(), SpecialListFiles\execute(), SpecialUserlogout\execute(), SpecialPreferences\execute(), SpecialBlankpage\execute(), SpecialApiHelp\execute(), SpecialSpecialpages\execute(), SpecialLog\execute(), SpecialContributions\execute(), SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), SpecialRunJobs\execute(), SpecialStatistics\execute(), SpecialUnblock\execute(), RedirectSpecialPage\execute(), SpecialExport\execute(), SpecialJavaScriptTest\execute(), SpecialWatchlist\execute(), SpecialListGroupRights\execute(), SpecialRecentChanges\execute(), ChangesListSpecialPage\execute(), SpecialWhatLinksHere\execute(), SpecialBlockList\execute(), SpecialPagesWithProp\execute(), EmailConfirmation\execute(), SpecialAllMessages\execute(), SpecialChangePassword\execute(), SpecialBookSources\execute(), SpecialEditTags\execute(), SpecialChangeEmail\execute(), SpecialExpandTemplates\execute(), SpecialPrefixindex\execute(), SpecialVersion\execute(), RandomPage\execute(), SpecialTrackingCategories\execute(), SpecialAllPages\execute(), SpecialImport\execute(), SpecialResetTokens\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), SpecialSearch\execute(), UserrightsPage\execute(), UnwatchedpagesPage\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), SpecialMergeHistory\execute(), SpecialRevisionDelete\execute(), SpecialNewpages\execute(), MIMEsearchPage\execute(), SpecialUpload\execute(), LoginForm\execute(), SpecialActiveUsers\execute(), DeletedContributionsPage\execute(), SpecialListUsers\execute(), QueryPage\execute(), SpecialUndelete\execute(), LoginForm\executeReturnTo(), SpecialEditWatchlist\executeViewEditWatchlist(), SpecialJavaScriptTest\exportQUnit(), SpecialEditTags\failure(), SpecialRevisionDelete\failure(), SpecialNewpages\feed(), SpecialNewpages\form(), SpecialVersion\getCreditsForExtension(), SpecialRandomInCategory\getFormFields(), SpecialDiff\getRedirect(), DeletedContributionsPage\getSubTitle(), SpecialSearch\goResult(), SpecialVersion\listAuthors(), LoginForm\mainLoginForm(), SpecialMergeHistory\merge(), SpecialCachedPage\onCacheInitialized(), SpecialRandomInCategory\onSubmit(), SpecialChangePassword\onSubmit(), SpecialResetTokens\onSuccess(), SpecialUnlockdb\onSuccess(), SpecialLockdb\onSuccess(), SpecialChangeEmail\onSuccess(), SpecialPageLanguage\onSuccess(), SpecialChangePassword\onSuccess(), SpecialPasswordReset\onSuccess(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), outputHeader(), MediaStatisticsPage\outputMediaType(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialSpecialpages\outputPageList(), SpecialEditWatchlist\outputSubtitle(), MediaStatisticsPage\outputTableEnd(), MediaStatisticsPage\outputTableRow(), MediaStatisticsPage\outputTableStart(), SpecialJavaScriptTest\plainQUnit(), SpecialPageLanguage\preText(), SpecialUpload\processUpload(), setHeaders(), SpecialNewFiles\setTopText(), SpecialRecentChangesLinked\setTopText(), SpecialRecentChanges\setTopText(), SpecialWatchlist\setTopText(), SpecialSearch\setupPage(), SpecialLog\show(), SpecialTags\showActivateDeactivateForm(), SpecialAllPages\showChunk(), SpecialEditTags\showConvenienceLinks(), SpecialRevisionDelete\showConvenienceLinks(), SpecialSearch\showCreateLink(), SpecialTags\showDeleteTagForm(), SpecialUndelete\showDiff(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFile(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialEditTags\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(), SpecialTags\showTagList(), SpecialUploadStash\showUpload(), SpecialUpload\showUploadForm(), SpecialUploadStash\showUploads(), SpecialUpload\showViewDeletedLinks(), SpecialEditTags\submit(), SpecialRevisionDelete\submit(), SpecialPreferences\submitReset(), SpecialEditTags\success(), SpecialRevisionDelete\success(), UserrightsPage\switchForm(), SpecialRevisionDelete\tryShowFile(), SpecialUndelete\undelete(), SpecialUpload\unsaveUploadedFile(), and SpecialJavaScriptTest\viewQUnit().

SpecialPage::getPageTitle (   $subpage = false)

Get a self-referential title object.

Parameters
string | bool$subpage
Returns
Title
Since
1.23

Definition at line 485 of file SpecialPage.php.

Referenced by LoginForm\addNewAccount(), LoginForm\addNewAccountInternal(), SpecialWatchlist\daysLink(), SpecialUndelete\diffHeader(), SpecialRecentChanges\doHeader(), SpecialTags\doTagRow(), SpecialApiHelp\execute(), SpecialExport\execute(), SpecialJavaScriptTest\execute(), SpecialWatchlist\execute(), SpecialWhatLinksHere\execute(), SpecialBlockList\execute(), SpecialExpandTemplates\execute(), SpecialImport\execute(), SpecialSearch\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), QueryPage\execute(), SpecialNewpages\feed(), QueryPage\feedUrl(), SpecialNewpages\filterLinks(), SpecialUndelete\formatFileRow(), SpecialUndelete\formatRevisionRow(), SpecialEditWatchlist\getClearForm(), SpecialVersion\getCreditsForExtension(), SpecialJavaScriptTest\getFrameworkListHtml(), SpecialEditWatchlist\getNormalForm(), WithoutInterwikiPage\getPageHeader(), MIMEsearchPage\getPageHeader(), SpecialEditWatchlist\getRawForm(), UserrightsPage\getSuccessURL(), getTitle(), SpecialUpload\getUploadForm(), SpecialWatchlist\hoursLink(), SpecialVersion\listAuthors(), LoginForm\load(), LoginForm\mainLoginForm(), SpecialBookSources\makeForm(), SpecialExpandTemplates\makeForm(), LoginForm\makeLanguageSelectorLink(), SpecialRecentChanges\makeOptionsLink(), SpecialSearch\makeSearchLink(), SpecialAllPages\namespaceForm(), SpecialPrefixindex\namespacePrefixForm(), 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(), SpecialWatchlist\showHideLink(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialUndelete\showList(), SpecialMergeHistory\showMergeForm(), SpecialProtectedpages\showOptions(), SpecialProtectedtitles\showOptions(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialSearch\showResults(), SpecialUndelete\showRevision(), SpecialUndelete\showSearchForm(), SpecialTags\showTagList(), SpecialUploadStash\showUploads(), SpecialPreferences\submitReset(), UserrightsPage\switchForm(), SpecialRevisionDelete\tryShowFile(), SpecialEmailUser\userForm(), SpecialWhatLinksHere\whatlinkshereForm(), and SpecialWhatLinksHere\wlhLink().

SpecialPage::getRequest ( )

Get the WebRequest being used for this instance.

Returns
WebRequest
Since
1.18

Definition at line 522 of file SpecialPage.php.

References getContext().

Referenced by LoginForm\addNewAccountInternal(), SpecialBlock\alterForm(), SpecialPasswordReset\alterForm(), SpecialChangeEmail\alterForm(), SpecialChangePassword\alterForm(), SpecialChangePassword\attemptReset(), SpecialRevisionDelete\buildCheckBoxes(), SpecialChangePassword\checkExecutePermissions(), SpecialRedirect\dispatchFile(), SpecialImport\doImport(), SpecialListFiles\execute(), SpecialUserlogout\execute(), SpecialPreferences\execute(), SpecialApiHelp\execute(), SpecialLog\execute(), SpecialContributions\execute(), WithoutInterwikiPage\execute(), SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), SpecialRunJobs\execute(), SpecialExport\execute(), SpecialUnblock\execute(), SpecialWatchlist\execute(), SpecialTags\execute(), SpecialRecentChanges\execute(), SpecialWhatLinksHere\execute(), SpecialPagesWithProp\execute(), SpecialBlockList\execute(), SpecialAllMessages\execute(), SpecialBookSources\execute(), SpecialEditTags\execute(), SpecialExpandTemplates\execute(), SpecialPrefixindex\execute(), RandomPage\execute(), MovePageForm\execute(), SpecialAllPages\execute(), SpecialImport\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), SpecialSearch\execute(), UserrightsPage\execute(), LinkSearchPage\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(), SpecialSearch\load(), LoginForm\load(), SpecialUpload\loadRequest(), SpecialUndelete\loadRequest(), SpecialMergeHistory\loadRequestParams(), LoginForm\mailPasswordInternal(), LoginForm\mainLoginForm(), SpecialExpandTemplates\makeForm(), SpecialBlock\maybeAlterFormDefaults(), SpecialPasswordReset\onSubmit(), SpecialChangePassword\onSubmit(), SpecialChangeEmail\onSuccess(), SpecialChangePassword\onSuccess(), LoginForm\processLogin(), SpecialSearch\saveNamespaces(), UserrightsPage\saveUserGroups(), SpecialBlock\setParameter(), SpecialNewpages\setup(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFile(), SpecialRevisionDelete\showForm(), SpecialExpandTemplates\showHtmlPreview(), EmailConfirmation\showRequestForm(), SpecialCachedPage\startCache(), SpecialEditTags\submit(), SpecialRevisionDelete\submit(), SpecialRevisionDelete\tryShowFile(), and LoginForm\userBlockedMessage().

SpecialPage::getRestriction ( )

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

Returns
string

Definition at line 127 of file SpecialPage.php.

References $mRestriction.

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

Referenced by setHeaders().

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

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

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

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

Definition at line 325 of file SpecialPage.php.

References array().

Referenced by prefixSearchSubpages().

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

References getPageTitle().

Referenced by SpecialUpload\getExistsWarning().

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

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

Referenced by ApiQuerySiteinfo\appendExtensions(), EmailConfirmation\attemptConfirm(), Linker\blockLink(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SpecialEditWatchlist\buildRemoveLine(), SpecialEditWatchlist\buildTools(), Title\checkReadPermissions(), ApiFormatBase\closePrinter(), LoginForm\cookieRedirectCheck(), DifferenceEngine\deletedLink(), SpecialTags\doTagRow(), Linker\emailLink(), TidyUpBug37714\execute(), UserloginTemplate\execute(), ApiCreateAccount\execute(), ApiHelp\execute(), SpecialUserlogout\execute(), SpecialListGroupRights\execute(), SpecialWatchlist\execute(), ApiFeedContributions\execute(), SpecialBlockList\execute(), ApiFeedWatchlist\execute(), SpecialResetTokens\execute(), SpecialEditWatchlist\execute(), SpecialEditWatchlist\executeViewEditWatchlist(), OldChangesList\formatChangeLine(), UnusedtemplatesPage\formatResult(), ListDuplicatedFilesPage\formatResult(), DeletedContribsPager\formatRevisionRow(), BlockListPager\formatValue(), MergeLogFormatter\getActionLinks(), MoveLogFormatter\getActionLinks(), BlockLogFormatter\getActionLinks(), DeleteLogFormatter\getActionLinks(), RevDelArchivedFileItem\getApiData(), RevDelFileItem\getApiData(), PreferencesForm\getButtons(), InfoAction\getContributors(), HistoryAction\getDescription(), RevDelArchiveItem\getDiffLink(), SpecialUpload\getExistsWarning(), ApiFeedRecentChanges\getFeedObject(), SpecialUnblock\getFields(), SpecialStatistics\getGroupStats(), OutputPage\getHeadLinksArray(), ApiHelp\getHelpInternal(), ChangeTagsLogItem\getHTML(), RevDelLogItem\getHTML(), RevDelArchivedFileItem\getLink(), RevDelFileItem\getLink(), RCCacheEntryFactory\getLogLink(), ApiParamInfo\getModuleInfo(), SearchEngine\getNearMatchInternal(), SpecialStatistics\getPageStats(), ManualLogEntry\getRecentChange(), SpecialMycontributions\getRedirect(), SpecialMyuploads\getRedirect(), SpecialRedirectToSpecial\getRedirect(), SpecialAllMyUploads\getRedirect(), RevDelArchiveItem\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(), EnhancedChangesList\makeCacheGroupingKey(), MostlinkedPage\makeWlhLink(), WantedQueryPage\makeWlhLink(), MostlinkedTemplatesPage\makeWlhLink(), RecentChangesUpdateJob\newCacheUpdateJob(), RecentChangesUpdateJob\newPurgeJob(), Linker\normaliseSpecialPage(), MarkpatrolledAction\onView(), ImagePage\openShowImage(), SpecialListGroupRights\outputNamespaceProtectionInfo(), MediaStatisticsPage\outputTableRow(), InfoAction\pageInfo(), MediaWiki\parseTitle(), MediaWiki\performRequest(), SpecialBlock\postText(), SkinTemplate\prepareQuickTemplate(), Preferences\profilePreferences(), EnhancedChangesList\recentChangesBlockLine(), UserNotLoggedIn\report(), Linker\revDeleteLink(), LogPage\saveContent(), SpecialEditTags\showConvenienceLinks(), SpecialRevisionDelete\showConvenienceLinks(), LogEventsList\showOptions(), OutputPage\showPermissionsErrorPage(), SpecialUpload\showViewDeletedLinks(), CoreParserFunctions\special(), Linker\specialLink(), RevDelLogList\suggestTarget(), SpecialPageTest\testGetTitleFor(), SpecialPageTest\testGetTitleForWithWarning(), SpecialPageTest\testInvalidGetTitleFor(), ExtraParserTest\testTrackingCategorySpecial(), ChangeTags\updateTagsWithChecks(), Linker\userLink(), Linker\userToolLinks(), and Preferences\watchlistPreferences().

SpecialPage::getUser ( )

Shortcut to get the User executing this instance.

Returns
User
Since
1.18

Definition at line 542 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(), SpecialChangeEmail\checkExecutePermissions(), 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(), SpecialLog\execute(), SpecialWatchlist\execute(), EmailConfirmation\execute(), SpecialEditTags\execute(), MovePageForm\execute(), SpecialImport\execute(), SpecialUploadStash\execute(), UserrightsPage\execute(), SpecialEmailUser\execute(), SpecialRevisionDelete\execute(), FormSpecialPage\execute(), SpecialUpload\execute(), LoginForm\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(), SpecialLog\getActionButtons(), SpecialRecentChanges\getDefaultOptions(), SpecialWatchlist\getDefaultOptions(), SpecialUndelete\getFileLink(), SpecialEmailUser\getFormFields(), SpecialPasswordReset\getFormFields(), SpecialChangeEmail\getFormFields(), SpecialChangePassword\getFormFields(), SpecialResetTokens\getFormFields(), SpecialBlock\getFormFields(), SpecialSpecialpages\getPageGroups(), SpecialUndelete\getPageLink(), SpecialMypage\getRedirect(), SpecialMytalk\getRedirect(), SpecialMycontributions\getRedirect(), SpecialMyuploads\getRedirect(), SpecialAllMyUploads\getRedirect(), DeletedContributionsPage\getSubTitle(), SpecialUpload\getWatchCheck(), SpecialEditWatchlist\getWatchlist(), SpecialEditWatchlist\getWatchlistInfo(), SpecialUndelete\isAllowed(), SpecialPasswordReset\isListed(), SpecialSearch\load(), SpecialUpload\loadRequest(), SpecialUndelete\loadRequest(), SpecialMergeHistory\loadRequestParams(), LoginForm\mailPasswordInternal(), LoginForm\mainLoginForm(), SpecialExpandTemplates\makeForm(), SpecialBlock\maybeAlterFormDefaults(), SpecialMergeHistory\merge(), SpecialLockdb\onSubmit(), SpecialPageLanguage\onSubmit(), SpecialChangeEmail\onSubmit(), SpecialResetTokens\onSubmit(), SpecialPasswordReset\onSubmit(), SpecialChangePassword\onSubmit(), SpecialChangeEmail\onSuccess(), SpecialChangePassword\onSuccess(), SpecialPasswordReset\onSuccess(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), SpecialWatchlist\outputFeedLinks(), SpecialEditWatchlist\outputSubtitle(), SpecialNewpages\patrollable(), SpecialSearch\powerSearchBox(), LoginForm\processLogin(), SpecialUpload\processUpload(), requireLogin(), SpecialSearch\saveNamespaces(), SpecialWatchlist\setTopText(), SpecialNewpages\setup(), SpecialTags\showActivateDeactivateForm(), SpecialRevisionDelete\showConvenienceLinks(), SpecialTags\showDeleteTagForm(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialSearch\showHit(), SpecialExpandTemplates\showHtmlPreview(), SpecialBlockList\showList(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialUndelete\showRevision(), SpecialTags\showTagList(), SpecialUpload\showViewDeletedLinks(), SpecialEditTags\submit(), SpecialRevisionDelete\submit(), SpecialEditWatchlist\submitClear(), SpecialEditWatchlist\submitRaw(), SpecialPreferences\submitReset(), LoginForm\successfulCreation(), LoginForm\successfulLogin(), SpecialRevisionDelete\tryShowFile(), SpecialUndelete\undelete(), SpecialEditWatchlist\unwatchTitles(), SpecialExport\userCanOverrideExportDepth(), and SpecialEditWatchlist\watchTitles().

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

Definition at line 211 of file SpecialPage.php.

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

Definition at line 198 of file SpecialPage.php.

SpecialPage::isIncludable ( )

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

Returns
bool

Definition at line 165 of file SpecialPage.php.

References $mIncludable.

SpecialPage::isListed ( )

Whether this special page is listed in Special:SpecialPages.

Since
1.3 (r3583)
Returns
bool

Definition at line 137 of file SpecialPage.php.

References $mListed.

SpecialPage::isRestricted ( )

Can be overridden by subclasses with more complicated permissions schemes.

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

Definition at line 222 of file SpecialPage.php.

References User\groupHasPermission().

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

References wfSetVar().

Referenced by SpecialChangePassword\__construct().

SpecialPage::msg ( )

Wrapper around wfMessage that sets the current context.

Returns
Message
See Also
wfMessage

Definition at line 602 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(), SpecialEditTags\buildCheckBoxes(), SpecialRevisionDelete\buildCheckBoxes(), SpecialEditWatchlist\buildRemoveLine(), SpecialRecentChanges\categoryFilterForm(), SpecialComparePages\checkExistingRevision(), SpecialComparePages\checkExistingTitle(), SpecialWatchlist\cutoffLinks(), SpecialUndelete\diffHeader(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialRecentChangesLinked\doMainQuery(), MovePageForm\doSubmit(), SpecialTags\doTagRow(), SpecialUserlogout\execute(), SpecialApiHelp\execute(), SpecialContributions\execute(), SpecialStatistics\execute(), SpecialJavaScriptTest\execute(), SpecialUnblock\execute(), SpecialExport\execute(), SpecialListGroupRights\execute(), SpecialWhatLinksHere\execute(), SpecialBlockList\execute(), SpecialPagesWithProp\execute(), SpecialPrefixindex\execute(), SpecialVersion\execute(), SpecialTrackingCategories\execute(), SpecialAllPages\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), SpecialMergeHistory\execute(), DeletedContributionsPage\execute(), SpecialListUsers\execute(), QueryPage\execute(), SpecialUndelete\execute(), SpecialEditWatchlist\executeViewEditWatchlist(), SpecialEditTags\failure(), SpecialRevisionDelete\failure(), SpecialNewpages\feed(), QueryPage\feedDesc(), SpecialNewpages\feedItemDesc(), SpecialNewpages\filterLinks(), SpecialNewpages\form(), SpecialUndelete\formatFileRow(), SpecialListGroupRights\formatPermissions(), UnusedtemplatesPage\formatResult(), FewestrevisionsPage\formatResult(), WantedQueryPage\formatResult(), MostlinkedCategoriesPage\formatResult(), UnwatchedpagesPage\formatResult(), ShortPagesPage\formatResult(), WantedCategoriesPage\formatResult(), MostcategoriesPage\formatResult(), ListDuplicatedFilesPage\formatResult(), BrokenRedirectsPage\formatResult(), MostinterwikisPage\formatResult(), MostlinkedPage\formatResult(), DoubleRedirectsPage\formatResult(), SpecialPagesWithProp\formatResult(), MIMEsearchPage\formatResult(), LinkSearchPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialUndelete\formatRevisionRow(), SpecialProtectedtitles\formatRow(), SpecialStatistics\formatRow(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), SpecialStatistics\formatRowHeader(), SpecialLog\getActionButtons(), SpecialProtectedpages\getCascadeCheck(), MostimagesPage\getCellHtml(), SpecialEditWatchlist\getClearForm(), SpecialVersion\getCreditsForExtension(), SpecialEmailUser\getDescription(), LoginForm\getDescription(), SpecialEditTags\getDescription(), getDescription(), SpecialUpload\getDupeWarning(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), SpecialProtectedpages\getExpiryCheck(), SpecialVersion\getExtensionCredits(), SpecialVersion\getExternalLibraries(), SpecialRecentChangesLinked\getExtraOptions(), SpecialUndelete\getFileComment(), SpecialUndelete\getFileUser(), SpecialWhatLinksHere\getFilterPanel(), getFinalGroupName(), FormSpecialPage\getForm(), SpecialPageLanguage\getFormFields(), SpecialEmailUser\getFormFields(), SpecialChangeEmail\getFormFields(), SpecialChangePassword\getFormFields(), SpecialResetTokens\getFormFields(), SpecialBlock\getFormFields(), SpecialRedirect\getFormFields(), SpecialJavaScriptTest\getFrameworkListHtml(), SpecialStatistics\getGroupStats(), SpecialProtectedtitles\getLevelMenu(), SpecialProtectedpages\getLevelMenu(), SpecialImport\getMappingFormPart(), SpecialProtectedpages\getNamespaceMenu(), SpecialProtectedtitles\getNamespaceMenu(), SpecialEditWatchlist\getNormalForm(), RandomPage\getNsList(), SpecialStatistics\getOtherStats(), LonelyPagesPage\getPageHeader(), DeadendPagesPage\getPageHeader(), UnusedCategoriesPage\getPageHeader(), WantedFilesPage\getPageHeader(), WithoutInterwikiPage\getPageHeader(), DoubleRedirectsPage\getPageHeader(), BrokenRedirectsPage\getPageHeader(), UnusedimagesPage\getPageHeader(), UnusedtemplatesPage\getPageHeader(), MIMEsearchPage\getPageHeader(), SpecialStatistics\getPageStats(), SpecialVersion\getParserFunctionHooks(), SpecialVersion\getParserTags(), SpecialWhatLinksHere\getPrevNext(), SpecialEditWatchlist\getRawForm(), SpecialProtectedpages\getRedirectCheck(), SpecialProtectedpages\getSizeLimit(), SpecialVersion\getSkinCredits(), DeletedContributionsPage\getSubTitle(), MediaStatisticsPage\getTableHeaderRow(), SpecialProtectedpages\getTypeMenu(), SpecialUpload\getUploadForm(), SpecialStatistics\getUserStats(), SpecialVersion\getWgHooks(), UserrightsPage\groupCheckboxes(), SpecialVersion\listAuthors(), SpecialWhatLinksHere\listItem(), LoginForm\load(), LoginForm\mailPasswordInternal(), LoginForm\mainLoginForm(), SpecialBookSources\makeForm(), SpecialExpandTemplates\makeForm(), UserrightsPage\makeGroupNameList(), LoginForm\makeLanguageSelector(), SpecialExpandTemplates\makeOutput(), SpecialSearch\makeSearchLink(), WantedQueryPage\makeWlhLink(), MostlinkedTemplatesPage\makeWlhLink(), SpecialMergeHistory\merge(), SpecialRecentChanges\namespaceFilterForm(), SpecialAllPages\namespaceForm(), SpecialPrefixindex\namespacePrefixForm(), LoginForm\onCookieRedirectCheck(), SpecialLockdb\onSubmit(), SpecialRandomInCategory\onSubmit(), SpecialPasswordReset\onSubmit(), SpecialUnlockdb\onSuccess(), SpecialLockdb\onSuccess(), SpecialVersion\openExtType(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), outputHeader(), MediaStatisticsPage\outputMediaType(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialEditWatchlist\outputSubtitle(), MediaStatisticsPage\outputTableRow(), SpecialSearch\powerSearchBox(), SpecialMergeHistory\preCacheMessages(), SpecialTrackingCategories\prepareTrackingCategoriesData(), SpecialTags\processCreateTagForm(), LoginForm\processLogin(), SpecialTags\processTagForm(), SpecialUpload\processUpload(), SpecialUpload\processVerificationError(), SpecialSearch\searchProfileTabs(), SpecialNewFiles\setTopText(), SpecialRecentChanges\setTopText(), SpecialWatchlist\setTopText(), SpecialSearch\setupPage(), SpecialSearch\shortDialog(), SpecialTags\showActivateDeactivateForm(), SpecialAllPages\showChunk(), SpecialEditTags\showConvenienceLinks(), SpecialRevisionDelete\showConvenienceLinks(), SpecialTags\showDeleteTagForm(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), MovePageForm\showForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialWatchlist\showHideLink(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialSearch\showHit(), SpecialExpandTemplates\showHtmlPreview(), SpecialSearch\showInterwiki(), SpecialSearch\showInterwikiHit(), SpecialBlockList\showList(), SpecialBookSources\showList(), SpecialUndelete\showList(), SpecialMergeHistory\showMergeForm(), SpecialProtectedpages\showOptions(), SpecialProtectedtitles\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(), SpecialEditTags\success(), SpecialRevisionDelete\success(), LoginForm\successfulCreation(), LoginForm\successfulLogin(), UserrightsPage\switchForm(), SpecialRevisionDelete\tryShowFile(), SpecialUndelete\undelete(), LoginForm\userBlockedMessage(), SpecialEmailUser\userForm(), SpecialJavaScriptTest\viewQUnit(), and SpecialWhatLinksHere\whatlinkshereForm().

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 440 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(), SpecialLog\execute(), SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), SpecialUnblock\execute(), SpecialExport\execute(), SpecialListGroupRights\execute(), SpecialTags\execute(), ChangesListSpecialPage\execute(), SpecialWhatLinksHere\execute(), SpecialBlockList\execute(), SpecialPagesWithProp\execute(), SpecialAllMessages\execute(), SpecialBookSources\execute(), SpecialComparePages\execute(), SpecialEditTags\execute(), SpecialPrefixindex\execute(), SpecialVersion\execute(), SpecialTrackingCategories\execute(), MovePageForm\execute(), SpecialAllPages\execute(), SpecialImport\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), SpecialSearch\execute(), UserrightsPage\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), SpecialMergeHistory\execute(), SpecialRevisionDelete\execute(), SpecialNewpages\execute(), MIMEsearchPage\execute(), SpecialUpload\execute(), SpecialActiveUsers\execute(), DeletedContributionsPage\execute(), SpecialListUsers\execute(), execute(), QueryPage\execute(), SpecialUndelete\execute(), and SpecialUploadStash\showUploads().

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

References $limit.

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

Definition at line 308 of file SpecialPage.php.

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

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

References getUser().

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

SpecialPage::run (   $subPage)
final

Entry point.

Since
1.20
Parameters
string | null$subPage

Definition at line 370 of file SpecialPage.php.

References afterExecute(), array(), beforeExecute(), execute(), and Hooks\run().

SpecialPage::setContext (   $context)

Sets the context this SpecialPage is executed in.

Parameters
IContextSource$context
Since
1.18

Definition at line 495 of file SpecialPage.php.

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

SpecialPage::setHeaders ( )

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

Definition at line 349 of file SpecialPage.php.

References array(), getConfig(), getDescription(), getOutput(), and getRobotPolicy().

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

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

References wfSetVar().

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?

Definition at line 235 of file SpecialPage.php.

References User\isAllowed().

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

Member Data Documentation

IContextSource SpecialPage::$mContext
protected

Current request context.

Definition at line 55 of file SpecialPage.php.

Referenced by getContext().

SpecialPage::$mIncludable
protected

Definition at line 51 of file SpecialPage.php.

Referenced by isIncludable().

SpecialPage::$mIncluding
protected

Definition at line 48 of file SpecialPage.php.

SpecialPage::$mListed
private

Definition at line 45 of file SpecialPage.php.

Referenced by isListed().

SpecialPage::$mLocalName
private

Definition at line 38 of file SpecialPage.php.

Referenced by getLocalName().

SpecialPage::$mName
protected

Definition at line 35 of file SpecialPage.php.

Referenced by getName().

SpecialPage::$mRestriction
protected

Definition at line 42 of file SpecialPage.php.

Referenced by getRestriction().


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