MediaWiki  REL1_24
SpecialPage Class Reference

Parent class for all special pages. More...

Inheritance diagram for SpecialPage:
Collaboration diagram for SpecialPage:

List of all members.

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

Static Public Member Functions

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

Protected Member Functions

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

Static Protected Member Functions

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

Protected Attributes

IContextSource $mContext
 Current request context.
 $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 106 of file SpecialPage.php.


Member Function Documentation

SpecialPage::addFeedLinks ( params) [protected]

Adds RSS/atom links.

Parameters:
array$params

Definition at line 603 of file SpecialPage.php.

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

Reimplemented in SpecialCachedPage.

Definition at line 394 of file SpecialPage.php.

SpecialPage::beforeExecute ( subPage) [protected]

Gets called before.

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

Definition at line 383 of file SpecialPage.php.

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

Exceptions:
PermissionsError

Definition at line 244 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct().

Shortcut to get main config object.

Returns:
Config
Since:
1.24

Definition at line 551 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialChangePassword\attemptReset(), SpecialUnlockdb\checkExecutePermissions(), SpecialLockdb\checkExecutePermissions(), SpecialImport\doImport(), SpecialRecentChanges\doMainQuery(), SpecialWatchlist\doMainQuery(), SpecialRunJobs\execute(), SpecialStatistics\execute(), SpecialTrackingCategories\execute(), SpecialExport\execute(), SpecialWatchlist\execute(), SpecialListGroupRights\execute(), SpecialLog\execute(), LinkSearchPage\execute(), SpecialEmailUser\execute(), SpecialNewpages\feedTitle(), UserrightsPage\fetchUser(), SpecialMyLanguage\findTitle(), SpecialRecentChanges\getExtraOptions(), SpecialRecentChanges\getFeedQuery(), SpecialPageLanguage\getFormFields(), SpecialChangeEmail\getFormFields(), SpecialChangePassword\getFormFields(), SpecialStatistics\getGroupStats(), SpecialProtectedtitles\getLevelMenu(), SpecialProtectedpages\getLevelMenu(), UnusedimagesPage\getQueryInfo(), WantedPagesPage\getQueryInfo(), LinkSearchPage\getQueryInfo(), SpecialResetTokens\getTokensList(), SpecialStatistics\getUserStats(), SpecialJavaScriptTest\initQUnitTesting(), LinkSearchPage\linkParameters(), SpecialPrefixindex\namespacePrefixForm(), SpecialUnlockdb\onSubmit(), SpecialLockdb\onSubmit(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialUploadStash\outputRemoteScaledThumb(), SpecialUploadStash\outputThumbFromStash(), SpecialLog\parseParams(), SpecialLog\prefixSearchSubpages(), SpecialUpload\processVerificationError(), SpecialWatchlist\setTopText(), SpecialImport\showForm(), and SpecialExport\validateLinkDepth().

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

Referenced by SpecialNewpages\feedTitle().

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

Return the full title, including $par.

Returns:
Title
Since:
1.18

Definition at line 561 of file SpecialPage.php.

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

Definition at line 657 of file SpecialPage.php.

Shortcut to get user's language.

Returns:
Language
Since:
1.19

Definition at line 542 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialChangePassword\attemptReset(), SpecialEditWatchlist\buildRemoveLine(), SpecialVersion\compare(), SpecialContributions\contributionsSub(), SpecialWatchlist\cutoffLinks(), SpecialWatchlist\daysLink(), SpecialWatchlist\doHeader(), SpecialTrackingCategories\execute(), SpecialBlockList\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialNewpages\filterLinks(), SpecialMyLanguage\findTitle(), SpecialListGroupRights\formatPermissions(), PopularPagesPage\formatResult(), AncientPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), FewestrevisionsPage\formatResult(), WantedQueryPage\formatResult(), MostlinkedCategoriesPage\formatResult(), UnwatchedpagesPage\formatResult(), ShortPagesPage\formatResult(), WantedCategoriesPage\formatResult(), MostcategoriesPage\formatResult(), BrokenRedirectsPage\formatResult(), MostinterwikisPage\formatResult(), MostlinkedTemplatesPage\formatResult(), ListredirectsPage\formatResult(), MostlinkedPage\formatResult(), DoubleRedirectsPage\formatResult(), SpecialPagesWithProp\formatResult(), MIMEsearchPage\formatResult(), SpecialProtectedtitles\formatRow(), SpecialVersion\getCreditsForExtension(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), MediaStatisticsPage\getExtensionList(), SpecialPageLanguage\getFormFields(), SpecialStatistics\getGroupStats(), SpecialStatistics\getMostViewedPages(), SpecialEditWatchlist\getNormalForm(), SpecialStatistics\getOtherStats(), SpecialStatistics\getPageStats(), SpecialStatistics\getUserStats(), SpecialStatistics\getViewsStats(), SpecialWatchlist\hoursLink(), SpecialJavaScriptTest\initQUnitTesting(), SpecialVersion\listToText(), SpecialRecentChanges\optionsPanel(), SpecialNewpages\parseParams(), SpecialUpload\processVerificationError(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), and EmailConfirmation\showRequestForm().

Get the localised name of the special page.

Returns:
string

Definition at line 183 of file SpecialPage.php.

Get the OutputPage being used for this instance.

Returns:
OutputPage
Since:
1.18

Definition at line 512 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialLog\addHeader(), SpecialRecentChanges\addModules(), SpecialPageLanguage\alterForm(), EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), SpecialContributions\contributionsSub(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialImport\doImport(), SpecialRecentChangesLinked\doMainQuery(), UserrightsPage\editUserGroupsForm(), SpecialNewFiles\execute(), SpecialListFiles\execute(), SpecialUserlogout\execute(), SpecialPreferences\execute(), SpecialRunJobs\execute(), SpecialSpecialpages\execute(), SpecialBlankpage\execute(), SpecialContributions\execute(), RedirectSpecialPage\execute(), SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), SpecialStatistics\execute(), SpecialTags\execute(), SpecialTrackingCategories\execute(), SpecialUnblock\execute(), SpecialExport\execute(), SpecialListGroupRights\execute(), SpecialWatchlist\execute(), SpecialJavaScriptTest\execute(), SpecialRecentChanges\execute(), EmailConfirmation\execute(), SpecialPagesWithProp\execute(), SpecialBlockList\execute(), SpecialChangePassword\execute(), SpecialBookSources\execute(), SpecialPrefixindex\execute(), SpecialVersion\execute(), SpecialImport\execute(), RandomPage\execute(), SpecialResetTokens\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), UserrightsPage\execute(), UnwatchedpagesPage\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), MIMEsearchPage\execute(), SpecialListUsers\execute(), SpecialEditWatchlist\executeViewEditWatchlist(), SpecialNewpages\form(), SpecialVersion\getCreditsForExtension(), SpecialJavaScriptTest\initQUnitTesting(), SpecialVersion\listAuthors(), SpecialRandomInCategory\onSubmit(), SpecialChangePassword\onSubmit(), SpecialResetTokens\onSuccess(), SpecialUnlockdb\onSuccess(), SpecialLockdb\onSuccess(), SpecialChangeEmail\onSuccess(), SpecialPageLanguage\onSuccess(), SpecialChangePassword\onSuccess(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), MediaStatisticsPage\outputMediaType(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialSpecialpages\outputPageList(), SpecialEditWatchlist\outputSubtitle(), MediaStatisticsPage\outputTableEnd(), MediaStatisticsPage\outputTableRow(), MediaStatisticsPage\outputTableStart(), SpecialPageLanguage\preText(), SpecialNewFiles\setTopText(), SpecialRecentChangesLinked\setTopText(), SpecialRecentChanges\setTopText(), SpecialWatchlist\setTopText(), SpecialLog\show(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFile(), SpecialUndelete\showFileConfirmationForm(), SpecialImport\showForm(), SpecialBlockList\showList(), SpecialBookSources\showList(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialUploadStash\showUpload(), SpecialUploadStash\showUploads(), SpecialPreferences\submitReset(), and UserrightsPage\switchForm().

Get the WebRequest being used for this instance.

Returns:
WebRequest
Since:
1.18

Definition at line 502 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialChangeEmail\alterForm(), SpecialChangePassword\alterForm(), SpecialChangePassword\attemptReset(), SpecialChangePassword\checkExecutePermissions(), SpecialImport\doImport(), SpecialListFiles\execute(), SpecialUserlogout\execute(), SpecialPreferences\execute(), SpecialRunJobs\execute(), SpecialContributions\execute(), SpecialProtectedpages\execute(), SpecialProtectedtitles\execute(), WithoutInterwikiPage\execute(), SpecialExport\execute(), SpecialUnblock\execute(), SpecialWatchlist\execute(), SpecialRecentChanges\execute(), SpecialBlockList\execute(), SpecialPagesWithProp\execute(), SpecialLog\execute(), SpecialBookSources\execute(), SpecialPrefixindex\execute(), RandomPage\execute(), SpecialImport\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), UserrightsPage\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), MIMEsearchPage\execute(), SpecialWatchlist\fetchOptionsFromRequest(), SpecialChangePassword\getFormFields(), SpecialFilepath\getRedirect(), RedirectSpecialPage\getRedirectQuery(), SpecialVersion\IPInfo(), SpecialChangeEmail\onSubmit(), SpecialChangePassword\onSubmit(), SpecialChangeEmail\onSuccess(), SpecialChangePassword\onSuccess(), UserrightsPage\saveUserGroups(), SpecialNewpages\setup(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFile(), and EmailConfirmation\showRequestForm().

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

Returns:
string

Definition at line 128 of file SpecialPage.php.

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

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

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

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

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

Referenced by DeletedContributionsPage\__construct(), ApiQuerySiteinfo\appendExtensions(), EmailConfirmation\attemptConfirm(), Linker\blockLink(), SpecialEditWatchlist\buildRemoveLine(), SpecialEditWatchlist\buildTools(), SpecialTags\doTagRow(), Linker\emailLink(), TidyUpBug37714\execute(), UserloginTemplate\execute(), ApiCreateAccount\execute(), SpecialUserlogout\execute(), SpecialWatchlist\execute(), SpecialListGroupRights\execute(), ApiFeedContributions\execute(), SpecialBlockList\execute(), ApiFeedWatchlist\execute(), SpecialResetTokens\execute(), SpecialEditWatchlist\execute(), SpecialEditWatchlist\executeViewEditWatchlist(), OldChangesList\formatChangeLine(), UnusedtemplatesPage\formatResult(), ListDuplicatedFilesPage\formatResult(), BlockListPager\formatValue(), MoveLogFormatter\getActionLinks(), DeleteLogFormatter\getActionLinks(), RevDelArchivedFileItem\getApiData(), RevDelFileItem\getApiData(), PreferencesForm\getButtons(), InfoAction\getContributors(), HistoryAction\getDescription(), RevDelArchiveItem\getDiffLink(), ApiFeedRecentChanges\getFeedObject(), SpecialUnblock\getFields(), SpecialStatistics\getGroupStats(), RevDelLogItem\getHTML(), RevDelArchivedFileItem\getLink(), SpecialStatistics\getPageStats(), SpecialMycontributions\getRedirect(), SpecialMyuploads\getRedirect(), SpecialAllMyUploads\getRedirect(), SpecialLog\getRevisionButton(), RevDelArchiveItem\getRevisionLink(), Skin\getSearchLink(), ImageListPager\getTitle(), SpecialPageFactory\getTitleForAlias(), Skin\getUndeleteLink(), Linker\getUploadUrl(), SpecialStatistics\getUserStats(), CreditsAction\link(), MostlinkedPage\makeWlhLink(), WantedQueryPage\makeWlhLink(), MostlinkedTemplatesPage\makeWlhLink(), Linker\normaliseSpecialPage(), MarkpatrolledAction\onView(), SpecialListGroupRights\outputNamespaceProtectionInfo(), MediaStatisticsPage\outputTableRow(), InfoAction\pageInfo(), SpecialBlock\postText(), Preferences\profilePreferences(), UserNotLoggedIn\report(), Linker\revDeleteLink(), CoreParserFunctions\special(), Linker\specialLink(), RevDelLogList\suggestTarget(), SpecialPageTest\testGetTitleFor(), SpecialPageTest\testGetTitleForWithWarning(), SpecialPageTest\testInvalidGetTitleFor(), Linker\userLink(), and Linker\userToolLinks().

Shortcut to get the User executing this instance.

Returns:
User
Since:
1.18

Definition at line 522 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), UserrightsPage\addLogEntry(), SpecialChangePassword\alterForm(), EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), SpecialChangePassword\attemptReset(), UserrightsPage\changeableGroups(), SpecialChangeEmail\checkExecutePermissions(), SpecialEditWatchlist\cleanupWatchlist(), SpecialEditWatchlist\clearWatchlist(), SpecialWatchlist\countItems(), SpecialWatchlist\doHeader(), SpecialImport\doImport(), SpecialRecentChangesLinked\doMainQuery(), SpecialRecentChanges\doMainQuery(), SpecialWatchlist\doMainQuery(), UserrightsPage\doSaveUserGroups(), SpecialTags\doTagRow(), SpecialPreferences\execute(), SpecialUserlogout\execute(), SpecialContributions\execute(), SpecialWatchlist\execute(), EmailConfirmation\execute(), SpecialLog\execute(), SpecialImport\execute(), UserrightsPage\execute(), SpecialEmailUser\execute(), UserrightsPage\fetchUser(), SpecialNewpages\filterLinks(), UnwatchedpagesPage\formatResult(), BrokenRedirectsPage\formatResult(), SpecialProtectedtitles\formatRow(), SpecialRecentChanges\getDefaultOptions(), SpecialWatchlist\getDefaultOptions(), SpecialEmailUser\getFormFields(), SpecialChangeEmail\getFormFields(), SpecialChangePassword\getFormFields(), SpecialResetTokens\getFormFields(), SpecialBlock\getFormFields(), SpecialSpecialpages\getPageGroups(), SpecialMypage\getRedirect(), SpecialMytalk\getRedirect(), SpecialMycontributions\getRedirect(), SpecialMyuploads\getRedirect(), SpecialAllMyUploads\getRedirect(), SpecialLog\getRevisionButton(), SpecialEditWatchlist\getWatchlist(), SpecialEditWatchlist\getWatchlistInfo(), SpecialLockdb\onSubmit(), SpecialChangeEmail\onSubmit(), SpecialResetTokens\onSubmit(), SpecialChangePassword\onSubmit(), SpecialChangeEmail\onSuccess(), SpecialChangePassword\onSuccess(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), SpecialWatchlist\outputChangesList(), SpecialWatchlist\outputFeedLinks(), SpecialEditWatchlist\outputSubtitle(), SpecialSearch\powerSearchBox(), SpecialWatchlist\setTopText(), SpecialNewpages\setup(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), SpecialImport\showForm(), SpecialBlockList\showList(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialEditWatchlist\submitClear(), SpecialEditWatchlist\submitRaw(), SpecialPreferences\submitReset(), SpecialEditWatchlist\unwatchTitles(), SpecialExport\userCanOverrideExportDepth(), and SpecialEditWatchlist\watchTitles().

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

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

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

Returns:
bool

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

Definition at line 199 of file SpecialPage.php.

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

Returns:
bool

Reimplemented in SpecialRecentChanges, IncludableSpecialPage, and WantedPagesPage.

Definition at line 166 of file SpecialPage.php.

Whether this special page is listed in Special:SpecialPages.

Since:
1.3 (r3583)
Returns:
bool

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

Definition at line 138 of file SpecialPage.php.

Can be overridden by subclasses with more complicated permissions schemes.

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

Reimplemented in SpecialCreateAccount, and UserrightsPage.

Definition at line 223 of file SpecialPage.php.

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

Referenced by SpecialChangePassword\__construct().

Wrapper around wfMessage that sets the current context.

Returns:
Message
See also:
wfMessage

Definition at line 582 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialUnlockdb\alterForm(), SpecialLockdb\alterForm(), SpecialChangePassword\alterForm(), SpecialChangePassword\attemptReset(), SpecialEditWatchlist\buildRemoveLine(), SpecialRecentChanges\categoryFilterForm(), SpecialComparePages\checkExistingRevision(), SpecialComparePages\checkExistingTitle(), SpecialWatchlist\cutoffLinks(), SpecialWatchlist\daysLink(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialRecentChangesLinked\doMainQuery(), SpecialTags\doTagRow(), SpecialUserlogout\execute(), SpecialContributions\execute(), SpecialStatistics\execute(), SpecialTags\execute(), SpecialExport\execute(), SpecialTrackingCategories\execute(), SpecialUnblock\execute(), SpecialListGroupRights\execute(), SpecialJavaScriptTest\execute(), SpecialPagesWithProp\execute(), SpecialBlockList\execute(), SpecialPrefixindex\execute(), SpecialVersion\execute(), SpecialEditWatchlist\execute(), SpecialCategories\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), SpecialListUsers\execute(), SpecialEditWatchlist\executeViewEditWatchlist(), SpecialNewpages\feedItemDesc(), SpecialNewpages\filterLinks(), SpecialNewpages\form(), SpecialListGroupRights\formatPermissions(), PopularPagesPage\formatResult(), 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(), SpecialProtectedtitles\formatRow(), SpecialStatistics\formatRow(), SpecialStatistics\formatRowHeader(), SpecialProtectedpages\getCascadeCheck(), MostimagesPage\getCellHtml(), SpecialEditWatchlist\getClearForm(), SpecialVersion\getCreditsForExtension(), SpecialEmailUser\getDescription(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), SpecialProtectedpages\getExpiryCheck(), SpecialVersion\getExtensionCredits(), SpecialPageLanguage\getFormFields(), SpecialEmailUser\getFormFields(), SpecialChangeEmail\getFormFields(), SpecialChangePassword\getFormFields(), SpecialResetTokens\getFormFields(), SpecialBlock\getFormFields(), SpecialJavaScriptTest\getFrameworkListHtml(), SpecialStatistics\getGroupStats(), SpecialProtectedtitles\getLevelMenu(), SpecialProtectedpages\getLevelMenu(), SpecialStatistics\getMostViewedPages(), 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(), SpecialEditWatchlist\getRawForm(), SpecialProtectedpages\getRedirectCheck(), SpecialLog\getRevisionButton(), SpecialProtectedpages\getSizeLimit(), SpecialVersion\getSkinCredits(), MediaStatisticsPage\getTableHeaderRow(), SpecialProtectedpages\getTypeMenu(), SpecialStatistics\getUserStats(), SpecialStatistics\getViewsStats(), SpecialVersion\getWgHooks(), UserrightsPage\groupCheckboxes(), SpecialJavaScriptTest\initQUnitTesting(), SpecialVersion\listAuthors(), SpecialBookSources\makeForm(), UserrightsPage\makeGroupNameList(), WantedQueryPage\makeWlhLink(), MostlinkedTemplatesPage\makeWlhLink(), SpecialRecentChanges\namespaceFilterForm(), SpecialPrefixindex\namespacePrefixForm(), SpecialLockdb\onSubmit(), SpecialRandomInCategory\onSubmit(), SpecialUnlockdb\onSuccess(), SpecialLockdb\onSuccess(), SpecialVersion\openExtType(), SpecialRecentChanges\optionsPanel(), SpecialRecentChanges\outputChangesList(), MediaStatisticsPage\outputMediaType(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialEditWatchlist\outputSubtitle(), MediaStatisticsPage\outputTableRow(), SpecialSearch\powerSearchBox(), SpecialUpload\processVerificationError(), SpecialNewFiles\setTopText(), SpecialRecentChanges\setTopText(), SpecialWatchlist\setTopText(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), SpecialImport\showForm(), SpecialWatchlist\showHideLink(), SpecialBlockList\showList(), SpecialBookSources\showList(), SpecialProtectedpages\showOptions(), SpecialProtectedtitles\showOptions(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialEditWatchlist\showTitles(), SpecialUploadStash\showUploads(), SpecialEditWatchlist\submitClear(), SpecialEditWatchlist\submitNormal(), SpecialEditWatchlist\submitRaw(), and UserrightsPage\switchForm().

static SpecialPage::prefixSearchArray ( search,
limit,
array subpages 
) [static, protected]

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

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

Definition at line 322 of file SpecialPage.php.

Referenced by SpecialPagesWithProp\prefixSearchSubpages(), SpecialWatchlist\prefixSearchSubpages(), SpecialLog\prefixSearchSubpages(), SpecialEditWatchlist\prefixSearchSubpages(), SpecialJavaScriptTest\prefixSearchSubpages(), and SpecialListUsers\prefixSearchSubpages().

SpecialPage::prefixSearchSubpages ( search,
limit = 10 
)

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
Returns:
string[] Matching subpages

Reimplemented in SpecialListUsers, SpecialJavaScriptTest, SpecialEditWatchlist, SpecialLog, SpecialPagesWithProp, and SpecialWatchlist.

Definition at line 308 of file SpecialPage.php.

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

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

SpecialPage::setContext ( context)

Sets the context this SpecialPage is executed in.

Parameters:
IContextSource$context
Since:
1.18

Definition at line 475 of file SpecialPage.php.

Referenced by ApiQueryUsers\execute().

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

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 SpecialUndelete, SpecialUpload, SpecialCreateAccount, SpecialPasswordReset, and UserrightsPage.

Definition at line 236 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct().


Member Data Documentation

IContextSource SpecialPage::$mContext [protected]

Current request context.

Definition at line 56 of file SpecialPage.php.

SpecialPage::$mIncludable [protected]

Definition at line 51 of file SpecialPage.php.

SpecialPage::$mIncluding [protected]

Definition at line 48 of file SpecialPage.php.

SpecialPage::$mListed [private]

Definition at line 45 of file SpecialPage.php.

SpecialPage::$mLocalName [private]

Definition at line 38 of file SpecialPage.php.

SpecialPage::$mName [protected]

Definition at line 35 of file SpecialPage.php.

SpecialPage::$mRestriction [protected]

Definition at line 42 of file SpecialPage.php.


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