MediaWiki  REL1_22
SpecialPage Class Reference

Parent special page class, also static functions for handling the special page list. More...

Inheritance diagram for SpecialPage:
Collaboration diagram for SpecialPage:

List of all members.

Public Member Functions

 __call ($fName, $a)
 Use PHP's magic __call handler to get calls to the old PHP4 constructor because PHP E_STRICT yells at you for having __construct() and SpecialPage()
 __construct ($name= '', $restriction= '', $listed=true, $function=false, $file= 'default', $includable=false)
 Default constructor for special pages Derivative classes should call this from their constructor Note that if the user does not have the required level, an error message will be displayed by the default execute() method, without the global function ever being called.
 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, calls the function given in mFunction.
 file ($x=null)
 These mutators are very evil, as the relevant variables should not mutate.
 func ($x=null)
 These mutators are very evil, as the relevant variables should not mutate.
 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.
 getFile ()
 Get the file which will be included by SpecialPage::execute() if your extension is still stuck in the past and hasn't overridden the execute() method.
 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.
 getLang ()
 Shortcut to get user's language.
 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.
 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.
 includable ($x=null)
 These mutators are very evil, as the relevant variables should not mutate.
 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.
 name ($x=null)
 These mutators are very evil, as the relevant variables should not mutate.
 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.
 restriction ($x=null)
 These mutators are very evil, as the relevant variables should not mutate.
 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 executePath (&$title, IContextSource &$context, $including=false)
 Execute a special page path.
static exists ($name)
 Check if a given name exist as a special page or as a special page alias.
static getGroup (&$page)
 Get the group that the special page belongs in on Special:SpecialPage.
static getLocalNameFor ($name, $subpage=false)
 Get the local name for a specified canonical name.
static getPage ($name)
 Find the object with a given name and return it (or NULL)
static getPageByAlias ($alias)
 Get a special page with a given localised name, or NULL if there is no such special page.
static getRegularPages ()
 Return categorised listable special pages for all users.
static getRestrictedPages ()
 Return categorised listable special pages which are available for the current user, but not for everyone.
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.
static getTitleForAlias ($alias)
 Get a title for a given alias.
static getUsablePages (User $user=null)
 Return categorised listable special pages which are available for the current user, and everyone.
static initAliasList ()
static initList ()
 Initialise the special page list This must be called before accessing SpecialPage::$mList.
static removePage ($name)
 Remove a special page from the list Formerly used to disable expensive or dangerous special pages.
static resolveAlias ($alias)
 Given a special page alias, return the special page name.
static resolveAliasWithSubpage ($alias)
 Given a special page name with a possible subpage, return an array where the first element is the special page name and the second is the subpage.
static setGroup ($page, $group)
 Add a page to a certain display group for Special:SpecialPages.

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'.

Protected Attributes

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

Private Member Functions

 init ($name, $restriction, $listed, $function, $file, $includable)
 Do the real work for the constructor, mainly so __call() can intercept calls to SpecialPage()

Private Attributes

 $mFile
 $mFunction
 $mListed
 $mLocalName
 $mRestriction

Detailed Description

Parent special page class, also static functions for handling the special page list.

Definition at line 29 of file SpecialPage.php.


Constructor & Destructor Documentation

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

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

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

Parameters:
string$nameName of the special page, as seen in links and URLs
string$restrictionUser right required, e.g. "block" or "delete"
bool$listedWhether the page is listed in Special:Specialpages
Callback | Bool$functionFunction called by execute(). By default it is constructed from $name
string$fileFile which is included by execute(). It is also constructed from $name by default
bool$includableWhether the page can be included in normal pages

Definition at line 315 of file SpecialPage.php.


Member Function Documentation

SpecialPage::__call ( fName,
a 
)

Use PHP's magic __call handler to get calls to the old PHP4 constructor because PHP E_STRICT yells at you for having __construct() and SpecialPage()

Parameters:
string$fNameName of called method
array$aArguments to the method
Exceptions:
MWException
Deprecated:
since 1.17, call parent::__construct()

Definition at line 360 of file SpecialPage.php.

SpecialPage::addFeedLinks ( params) [protected]

Adds RSS/atom links.

Parameters:
$paramsarray

Definition at line 860 of file SpecialPage.php.

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

SpecialPage::afterExecute ( subPage) [protected]

Gets called after.

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

Reimplemented in SpecialCachedPage.

Definition at line 662 of file SpecialPage.php.

SpecialPage::beforeExecute ( subPage) [protected]

Gets called before.

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

Definition at line 651 of file SpecialPage.php.

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

Definition at line 574 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct().

static SpecialPage::executePath ( &$  title,
IContextSource &$  context,
including = false 
) [static]

Execute a special page path.

The path may contain parameters, e.g. Special:Name/Params Extracts the special page name and call the execute method, passing the parameters

Returns a title object if the page is redirected, false if there was no such special page, and true if it was successful.

Parameters:
$titleTitle object
$contextIContextSource
$includingBool output is being captured for use in {{special:whatever}}
Returns:
Bool
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 231 of file SpecialPage.php.

static SpecialPage::exists ( name) [static]

Check if a given name exist as a special page or as a special page alias.

Parameters:
string$namename of a special page
Returns:
Boolean: true if a special page exists with this name
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 150 of file SpecialPage.php.

Referenced by SpecialBlock\maybeAlterFormDefaults().

SpecialPage::file ( x = null)

These mutators are very evil, as the relevant variables should not mutate.

So don't use them.

Parameters:
$xMixed
Returns:
Mixed
Deprecated:
since 1.18

Definition at line 486 of file SpecialPage.php.

Referenced by FileDuplicateSearchPage\execute(), and SpecialVersion\getSvnInfo().

SpecialPage::func ( x = null)

These mutators are very evil, as the relevant variables should not mutate.

So don't use them.

Parameters:
$xMixed
Returns:
Mixed
Deprecated:
since 1.18

Definition at line 474 of file SpecialPage.php.

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. Messages can be added at run-time, see MessageCache.php.

Returns:
String

Reimplemented in LoginForm, and SpecialEmailUser.

Definition at line 720 of file SpecialPage.php.

Referenced by SpecialNewpages\feedTitle().

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

No modern code should want or need to know this.

Returns:
String
Deprecated:
since 1.18

Definition at line 402 of file SpecialPage.php.

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

Return the full title, including $par.

Returns:
Title
Since:
1.18

Definition at line 828 of file SpecialPage.php.

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

static SpecialPage::getGroup ( &$  page) [static]

Get the group that the special page belongs in on Special:SpecialPage.

Parameters:
$pageSpecialPage
Returns:
string
Deprecated:
since 1.18 call SpecialPageFactory method directly

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

Definition at line 917 of file SpecialPage.php.

Shortcut to get user's language.

Deprecated:
since 1.19 Use getLanguage instead
Returns:
Language
Since:
1.18

Definition at line 807 of file SpecialPage.php.

Shortcut to get user's language.

Returns:
Language
Since:
1.19

Definition at line 818 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialChangePassword\attemptReset(), SpecialEditWatchlist\buildRemoveLine(), SpecialVersion\compare(), SpecialContributions\contributionsSub(), SpecialWatchlist\cutoffLinks(), SpecialWatchlist\daysLink(), SpecialWatchlist\execute(), SpecialBlockList\execute(), LinkSearchPage\execute(), FileDuplicateSearchPage\execute(), SpecialNewpages\filterLinks(), SpecialListGroupRights\formatPermissions(), WantedCategoriesPage\formatResult(), PopularPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), AncientPagesPage\formatResult(), UnwatchedpagesPage\formatResult(), FewestrevisionsPage\formatResult(), MostlinkedCategoriesPage\formatResult(), ShortPagesPage\formatResult(), MostcategoriesPage\formatResult(), MostinterwikisPage\formatResult(), BrokenRedirectsPage\formatResult(), MostlinkedTemplatesPage\formatResult(), ListredirectsPage\formatResult(), MostlinkedPage\formatResult(), DoubleRedirectsPage\formatResult(), SpecialPagesWithProp\formatResult(), MIMEsearchPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialProtectedtitles\formatRow(), SpecialProtectedpages\formatRow(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), SpecialStatistics\getGroupStats(), SpecialStatistics\getMostViewedPages(), SpecialEditWatchlist\getNormalForm(), SpecialStatistics\getOtherStats(), SpecialStatistics\getPageStats(), SpecialStatistics\getUserStats(), SpecialStatistics\getViewsStats(), SpecialWatchlist\hoursLink(), SpecialJavaScriptTest\initQUnitTesting(), SpecialVersion\listToText(), SpecialRecentChanges\optionsPanel(), SpecialNewpages\parseParams(), LoginForm\processLogin(), SpecialRevisionDelete\showConvenienceLinks(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), SpecialRevisionDelete\showForm(), EmailConfirmation\showRequestForm(), SpecialSearch\showResults(), MovePageForm\showSubpages(), and SpecialRevisionDelete\tryShowFile().

Get the localised name of the special page.

Definition at line 515 of file SpecialPage.php.

static SpecialPage::getLocalNameFor ( name,
subpage = false 
) [static]

Get the local name for a specified canonical name.

Parameters:
$nameString
$subpageMixed: boolean false, or string
Returns:
String
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 245 of file SpecialPage.php.

Get the OutputPage being used for this instance.

Returns:
OutputPage
Since:
1.18

Definition at line 776 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialLog\addHeader(), SpecialRecentChanges\addModules(), SpecialRevisionDelete\addUsageText(), EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), SpecialRecentChanges\checkLastModified(), SpecialContributions\contributionsSub(), SpecialRecentChanges\doHeader(), SpecialImport\doImport(), SpecialRecentchangeslinked\doMainQuery(), LinkSearchPage\doQuery(), MovePageForm\doSubmit(), UserrightsPage\editUserGroupsForm(), SpecialChangePassword\error(), SpecialNewFiles\execute(), SpecialListFiles\execute(), SpecialCategories\execute(), SpecialPreferences\execute(), SpecialSpecialpages\execute(), SpecialUserlogout\execute(), SpecialBlankpage\execute(), SpecialWatchlist\execute(), SpecialProtectedtitles\execute(), SpecialContributions\execute(), SpecialTags\execute(), SpecialProtectedpages\execute(), SpecialStatistics\execute(), SpecialExport\execute(), SpecialUnblock\execute(), SpecialChangePassword\execute(), SpecialBlockList\execute(), EmailConfirmation\execute(), SpecialPagesWithProp\execute(), SpecialJavaScriptTest\execute(), SpecialListGroupRights\execute(), LinkSearchPage\execute(), SpecialPrefixindex\execute(), SpecialVersion\execute(), SpecialBookSources\execute(), RandomPage\execute(), SpecialEditWatchlist\execute(), SpecialResetTokens\execute(), SpecialRandomInCategory\execute(), UserrightsPage\execute(), SpecialMergeHistory\execute(), SpecialRevisionDelete\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), MIMEsearchPage\execute(), SpecialRecentChanges\execute(), LoginForm\execute(), SpecialListUsers\execute(), SpecialRevisionDelete\failure(), SpecialNewpages\form(), SpecialJavaScriptTest\initQUnitTesting(), SpecialMergeHistory\merge(), SpecialResetTokens\onSuccess(), SpecialUnlockdb\onSuccess(), SpecialLockdb\onSuccess(), SpecialSpecialpages\outputPageList(), SpecialRecentchangeslinked\setTopText(), SpecialRecentChanges\setTopText(), SpecialSearch\setupPage(), SpecialLog\show(), SpecialRevisionDelete\showConvenienceLinks(), SpecialSearch\showCreateLink(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFile(), SpecialUndelete\showFileConfirmationForm(), SpecialChangePassword\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialBlockList\showList(), SpecialBookSources\showList(), MovePageForm\showLogFragment(), SpecialMergeHistory\showMergeForm(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialSearch\showResults(), MovePageForm\showSubpages(), SpecialUploadStash\showUpload(), SpecialUploadStash\showUploads(), SpecialRevisionDelete\submit(), SpecialPreferences\submitReset(), SpecialRevisionDelete\success(), UserrightsPage\switchForm(), SpecialRevisionDelete\tryShowFile(), and SpecialRecentChanges\webOutput().

static SpecialPage::getPage ( name) [static]

Find the object with a given name and return it (or NULL)

Parameters:
$nameString
Returns:
SpecialPage object or null if the page doesn't exist
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 162 of file SpecialPage.php.

static SpecialPage::getPageByAlias ( alias) [static]

Get a special page with a given localised name, or NULL if there is no such special page.

Parameters:
$aliasString
Returns:
SpecialPage object or null if the page doesn't exist
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 175 of file SpecialPage.php.

static SpecialPage::getRegularPages ( ) [static]

Return categorised listable special pages for all users.

Returns:
array Associative array mapping page's name to its SpecialPage object
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 200 of file SpecialPage.php.

Get the WebRequest being used for this instance.

Returns:
WebRequest
Since:
1.18

Definition at line 766 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialBlock\alterForm(), SpecialRevisionDelete\buildCheckBoxes(), SpecialImport\doImport(), SpecialListFiles\execute(), SpecialCategories\execute(), SpecialPreferences\execute(), SpecialUserlogout\execute(), SpecialContributions\execute(), SpecialWatchlist\execute(), WithoutInterwikiPage\execute(), SpecialProtectedtitles\execute(), SpecialProtectedpages\execute(), SpecialUnblock\execute(), SpecialExport\execute(), SpecialChangePassword\execute(), SpecialBlockList\execute(), SpecialPagesWithProp\execute(), LinkSearchPage\execute(), MovePageForm\execute(), SpecialLog\execute(), SpecialPrefixindex\execute(), SpecialVersion\execute(), SpecialBookSources\execute(), SpecialImport\execute(), RandomPage\execute(), SpecialEditWatchlist\execute(), SpecialRandomInCategory\execute(), UserrightsPage\execute(), SpecialRevisionDelete\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), MIMEsearchPage\execute(), SpecialRecentChanges\execute(), LoginForm\execute(), SpecialRevisionDelete\extractBitParams(), SpecialRecentchangeslinked\feedSetup(), SpecialRecentChanges\feedSetup(), SpecialRecentChanges\getOptions(), SpecialFilepath\getRedirect(), SpecialVersion\IPInfo(), SpecialBlock\maybeAlterFormDefaults(), LoginForm\processLogin(), UserrightsPage\saveUserGroups(), SpecialBlock\setParameter(), SpecialNewpages\setup(), SpecialRecentChanges\setup(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFile(), SpecialChangePassword\showForm(), SpecialRevisionDelete\showForm(), EmailConfirmation\showRequestForm(), SpecialRevisionDelete\submit(), and SpecialRevisionDelete\tryShowFile().

static SpecialPage::getRestrictedPages ( ) [static]

Return categorised listable special pages which are available for the current user, but not for everyone.

Returns:
array Associative array mapping page's name to its SpecialPage object
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 212 of file SpecialPage.php.

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

Returns:
String

Definition at line 391 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:
$nameString
string | Bool$subpagesubpage string, or false to not use a subpage
Returns:
Title object or null if the page doesn't exist

Definition at line 275 of file SpecialPage.php.

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

Shortcut to get the skin being used for this instance.

Returns:
Skin
Since:
1.18

Definition at line 796 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialEditWatchlist\buildRemoveLine(), SpecialContributions\execute(), SpecialBlock\setParameter(), and SpecialLog\show().

SpecialPage::getTitle ( subpage = false)

Get a self-referential title object.

Parameters:
$subpageString|Bool
Returns:
Title object

Definition at line 730 of file SpecialPage.php.

Referenced by SpecialWatchlist\daysLink(), SpecialRecentChanges\doHeader(), SpecialPreferences\execute(), SpecialWatchlist\execute(), SpecialExport\execute(), SpecialBlockList\execute(), EmailConfirmation\execute(), SpecialJavaScriptTest\execute(), LinkSearchPage\execute(), SpecialImport\execute(), SpecialEditWatchlist\execute(), SpecialRandomInCategory\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), MIMEsearchPage\execute(), SpecialNewpages\filterLinks(), SpecialNewpages\form(), SpecialRecentchangeslinked\getFeedObject(), SpecialRecentChanges\getFeedObject(), SpecialJavaScriptTest\getFrameworkListHtml(), SpecialEditWatchlist\getNormalForm(), WithoutInterwikiPage\getPageHeader(), SpecialEditWatchlist\getRawForm(), UserrightsPage\getSuccessURL(), SpecialWatchlist\hoursLink(), SpecialBookSources\makeForm(), SpecialRecentChanges\makeOptionsLink(), SpecialPrefixindex\namespacePrefixForm(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), SpecialChangePassword\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialWatchlist\showHideLink(), SpecialMergeHistory\showHistory(), SpecialMergeHistory\showMergeForm(), SpecialProtectedtitles\showOptions(), SpecialProtectedpages\showOptions(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialSearch\showResults(), SpecialUploadStash\showUploads(), SpecialPreferences\submitReset(), UserrightsPage\switchForm(), and SpecialRevisionDelete\tryShowFile().

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

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

Parameters:
$nameString
string | Bool$subpagesubpage string, or false to not use a subpage
string$fragmentthe link fragment (after the "#")
Exceptions:
MWException
Returns:
Title object

Definition at line 259 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), EmailConfirmation\attemptConfirm(), Linker\blockLink(), SkinTemplate\buildContentNavigationUrls(), SkinTemplate\buildNavUrls(), SpecialEditWatchlist\buildRemoveLine(), SpecialEditWatchlist\buildTools(), Title\checkReadPermissions(), SpecialTags\doTagRow(), Linker\emailLink(), TidyUpBug37714\execute(), UserloginTemplate\execute(), ApiCreateAccount\execute(), SpecialUserlogout\execute(), SpecialWatchlist\execute(), ApiFeedContributions\execute(), SpecialBlockList\execute(), EmailConfirmation\execute(), SpecialListGroupRights\execute(), ApiFeedWatchlist\execute(), SpecialEditWatchlist\execute(), SpecialResetTokens\execute(), UnusedtemplatesPage\formatResult(), SpecialProtectedpages\formatRow(), BlockListPager\formatValue(), MoveLogFormatter\getActionLinks(), DeleteLogFormatter\getActionLinks(), PreferencesForm\getButtons(), InfoAction\getContributors(), HistoryAction\getDescription(), RevDel_ArchiveItem\getDiffLink(), SpecialStatistics\getGroupStats(), RevDel_LogItem\getHTML(), RevDel_ArchivedFileItem\getLink(), SpecialStatistics\getPageStats(), SpecialLog\getRevisionButton(), RevDel_ArchiveItem\getRevisionLink(), Skin\getSearchLink(), ImageListPager\getTitle(), SpecialPageFactory\getTitleForAlias(), Skin\getUndeleteLink(), Linker\getUploadUrl(), SpecialStatistics\getUserStats(), ImageHistoryList\imageHistoryLine(), CreditsAction\link(), MostlinkedPage\makeWlhLink(), MostlinkedTemplatesPage\makeWlhLink(), Linker\normaliseSpecialPage(), MarkpatrolledAction\onView(), SkinTemplate\outputPage(), InfoAction\pageInfo(), SpecialBlock\postText(), Preferences\profilePreferences(), ManualLogEntry\publish(), EnhancedChangesList\recentChangesBlockLine(), OldChangesList\recentChangesLine(), EnhancedChangesList\recentChangesLine(), Linker\revDeleteLink(), SpecialRevisionDelete\showConvenienceLinks(), SpecialSearch\showResults(), CoreParserFunctions\special(), Linker\specialLink(), RevDel_LogList\suggestTarget(), ExtraParserTest\testTrackingCategorySpecial(), Linker\userLink(), and Linker\userToolLinks().

static SpecialPage::getTitleForAlias ( alias) [static]

Get a title for a given alias.

Parameters:
$aliasString
Returns:
Title or null if there is no such alias
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 291 of file SpecialPage.php.

static SpecialPage::getUsablePages ( User user = null) [static]

Return categorised listable special pages which are available for the current user, and everyone.

Parameters:
$userUser object to check permissions, $wgUser will be used if not provided
Returns:
array Associative array mapping page's name to its SpecialPage object
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 189 of file SpecialPage.php.

Referenced by SpecialSpecialpages\getPageGroups().

Shortcut to get the User executing this instance.

Returns:
User
Since:
1.18

Definition at line 786 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), UserrightsPage\addLogEntry(), SpecialRevisionDelete\addUsageText(), EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), SpecialChangePassword\attemptReset(), SpecialRecentChanges\buildMainQueryConds(), UserrightsPage\changeableGroups(), SpecialRecentChanges\checkLastModified(), SpecialEditWatchlist\cleanupWatchlist(), SpecialEditWatchlist\clearWatchlist(), SpecialWatchlist\countItems(), SpecialImport\doImport(), SpecialRecentchangeslinked\doMainQuery(), SpecialRecentChanges\doMainQuery(), UserrightsPage\doSaveUserGroups(), MovePageForm\doSubmit(), SpecialTags\doTagRow(), SpecialPreferences\execute(), SpecialUserlogout\execute(), SpecialWatchlist\execute(), SpecialContributions\execute(), SpecialChangePassword\execute(), EmailConfirmation\execute(), MovePageForm\execute(), SpecialLog\execute(), SpecialImport\execute(), SpecialEditWatchlist\execute(), UserrightsPage\execute(), SpecialRevisionDelete\execute(), SpecialEmailUser\execute(), UserrightsPage\fetchUser(), SpecialNewpages\filterLinks(), UnwatchedpagesPage\formatResult(), BrokenRedirectsPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialProtectedtitles\formatRow(), SpecialProtectedpages\formatRow(), SpecialRecentChanges\getDefaultOptions(), SpecialEmailUser\getFormFields(), SpecialResetTokens\getFormFields(), SpecialBlock\getFormFields(), SpecialSpecialpages\getPageGroups(), SpecialLog\getRevisionButton(), SpecialEditWatchlist\getWatchlist(), SpecialEditWatchlist\getWatchlistInfo(), SpecialMergeHistory\merge(), SpecialLockdb\onSubmit(), SpecialResetTokens\onSubmit(), SpecialRecentChanges\optionsPanel(), LoginForm\processLogin(), SpecialNewpages\setup(), SpecialRevisionDelete\showConvenienceLinks(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), SpecialChangePassword\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), SpecialBlockList\showList(), EmailConfirmation\showRequestForm(), SpecialPreferences\showResetForm(), SpecialRevisionDelete\submit(), SpecialEditWatchlist\submitRaw(), SpecialPreferences\submitReset(), SpecialRevisionDelete\tryShowFile(), SpecialEditWatchlist\unwatchTitles(), SpecialExport\userCanOverrideExportDepth(), SpecialEditWatchlist\watchTitles(), and SpecialRecentChanges\webOutput().

SpecialPage::includable ( x = null)

These mutators are very evil, as the relevant variables should not mutate.

So don't use them.

Parameters:
$xMixed
Returns:
Mixed
Deprecated:
since 1.18

Definition at line 498 of file SpecialPage.php.

SpecialPage::init ( name,
restriction,
listed,
function,
file,
includable 
) [private]

Do the real work for the constructor, mainly so __call() can intercept calls to SpecialPage()

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
Callback | Bool$functionFunction called by execute(). By default it is constructed from $name
string$fileFile which is included by execute(). It is also constructed from $name by default
bool$includableWhether the page can be included in normal pages

Definition at line 334 of file SpecialPage.php.

static SpecialPage::initAliasList ( ) [static]
Deprecated:
since 1.18

Definition at line 74 of file SpecialPage.php.

static SpecialPage::initList ( ) [static]

Initialise the special page list This must be called before accessing SpecialPage::$mList.

Deprecated:
since 1.18

Definition at line 66 of file SpecialPage.php.

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:
Boolean
Since:
1.21

Reimplemented in QueryPage, and FileDuplicateSearchPage.

Definition at line 543 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:
Boolean

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

Definition at line 530 of file SpecialPage.php.

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

Returns:
Bool

Reimplemented in IncludableSpecialPage, and WantedPagesPage.

Definition at line 439 of file SpecialPage.php.

Whether this special page is listed in Special:SpecialPages.

Since:
r3583 (v1.3)
Returns:
Bool

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

Definition at line 413 of file SpecialPage.php.

Can be overridden by subclasses with more complicated permissions schemes.

Returns:
Boolean: should the page be displayed with the restricted-access pages?

Reimplemented in UserrightsPage.

Definition at line 554 of file SpecialPage.php.

SpecialPage::listed ( x = null)

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

Since:
r11308 (v1.6)
Parameters:
$xBool
Returns:
Bool

Definition at line 431 of file SpecialPage.php.

Wrapper around wfMessage that sets the current context.

Returns:
Message
See also:
wfMessage

Definition at line 838 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct(), SpecialUnlockdb\alterForm(), SpecialLockdb\alterForm(), SpecialChangePassword\attemptReset(), SpecialRevisionDelete\buildCheckBoxes(), SpecialEditWatchlist\buildRemoveLine(), SpecialRecentChanges\categoryFilterForm(), SpecialComparePages\checkExistingRevision(), SpecialComparePages\checkExistingTitle(), SpecialWatchlist\cutoffLinks(), SpecialWatchlist\daysLink(), SpecialRecentChanges\doHeader(), SpecialRecentchangeslinked\doMainQuery(), MovePageForm\doSubmit(), SpecialTags\doTagRow(), SpecialCategories\execute(), SpecialUserlogout\execute(), SpecialContributions\execute(), SpecialWatchlist\execute(), SpecialTags\execute(), SpecialExport\execute(), SpecialStatistics\execute(), SpecialUnblock\execute(), SpecialChangePassword\execute(), SpecialBlockList\execute(), SpecialPagesWithProp\execute(), SpecialJavaScriptTest\execute(), SpecialListGroupRights\execute(), EmailConfirmation\execute(), LinkSearchPage\execute(), SpecialPrefixindex\execute(), SpecialEditWatchlist\execute(), SpecialRandomInCategory\execute(), SpecialMergeHistory\execute(), FileDuplicateSearchPage\execute(), SpecialEmailUser\execute(), MIMEsearchPage\execute(), SpecialListUsers\execute(), SpecialRevisionDelete\failure(), SpecialNewpages\feedItemDesc(), SpecialNewpages\filterLinks(), SpecialNewpages\form(), SpecialListGroupRights\formatPermissions(), WantedCategoriesPage\formatResult(), PopularPagesPage\formatResult(), UnusedtemplatesPage\formatResult(), UnwatchedpagesPage\formatResult(), FewestrevisionsPage\formatResult(), MostlinkedCategoriesPage\formatResult(), ShortPagesPage\formatResult(), MostcategoriesPage\formatResult(), MostinterwikisPage\formatResult(), BrokenRedirectsPage\formatResult(), MostlinkedPage\formatResult(), DoubleRedirectsPage\formatResult(), SpecialPagesWithProp\formatResult(), MIMEsearchPage\formatResult(), LinkSearchPage\formatResult(), SpecialMergeHistory\formatRevisionRow(), SpecialProtectedtitles\formatRow(), SpecialProtectedpages\formatRow(), SpecialStatistics\formatRow(), SpecialStatistics\formatRowHeader(), SpecialProtectedpages\getCascadeCheck(), MostimagesPage\getCellHtml(), SpecialVersion\getCreditsForExtension(), SpecialEmailUser\getDescription(), LoginForm\getDescription(), SpecialStatistics\getEditStats(), SpecialVersion\getEntryPointInfo(), SpecialProtectedpages\getExpiryCheck(), SpecialVersion\getExtensionCredits(), SpecialRecentchangeslinked\getExtraOptions(), SpecialRecentchangeslinked\getFeedObject(), SpecialRecentChanges\getFeedObject(), SpecialEmailUser\getFormFields(), SpecialResetTokens\getFormFields(), SpecialBlock\getFormFields(), SpecialJavaScriptTest\getFrameworkListHtml(), SpecialStatistics\getGroupStats(), SpecialProtectedtitles\getLevelMenu(), SpecialProtectedpages\getLevelMenu(), SpecialStatistics\getMostViewedPages(), SpecialProtectedtitles\getNamespaceMenu(), SpecialProtectedpages\getNamespaceMenu(), SpecialEditWatchlist\getNormalForm(), RandomPage\getNsList(), SpecialStatistics\getOtherStats(), DeadendPagesPage\getPageHeader(), LonelyPagesPage\getPageHeader(), UnusedCategoriesPage\getPageHeader(), WantedFilesPage\getPageHeader(), WithoutInterwikiPage\getPageHeader(), DoubleRedirectsPage\getPageHeader(), BrokenRedirectsPage\getPageHeader(), UnusedimagesPage\getPageHeader(), UnusedtemplatesPage\getPageHeader(), SpecialStatistics\getPageStats(), SpecialEditWatchlist\getRawForm(), SpecialLog\getRevisionButton(), SpecialProtectedpages\getSizeLimit(), SpecialProtectedpages\getTypeMenu(), SpecialStatistics\getUserStats(), SpecialStatistics\getViewsStats(), SpecialVersion\getWgHooks(), UserrightsPage\groupCheckboxes(), SpecialJavaScriptTest\initQUnitTesting(), SpecialVersion\listAuthors(), SpecialBookSources\makeForm(), UserrightsPage\makeGroupNameList(), MostlinkedTemplatesPage\makeWlhLink(), SpecialMergeHistory\merge(), SpecialRecentChanges\namespaceFilterForm(), SpecialPrefixindex\namespacePrefixForm(), SpecialLockdb\onSubmit(), SpecialUnlockdb\onSuccess(), SpecialLockdb\onSuccess(), SpecialRecentChanges\optionsPanel(), SpecialChangePassword\pretty(), LoginForm\processLogin(), SpecialRecentChanges\setTopText(), SpecialSearch\setupPage(), SpecialRevisionDelete\showConvenienceLinks(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), SpecialChangePassword\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialWatchlist\showHideLink(), SpecialMergeHistory\showHistory(), SpecialBlockList\showList(), SpecialBookSources\showList(), SpecialMergeHistory\showMergeForm(), SpecialProtectedtitles\showOptions(), SpecialProtectedpages\showOptions(), SpecialPrefixindex\showPrefixChunk(), EmailConfirmation\showRequestForm(), SpecialSearch\showResults(), SpecialEditWatchlist\showTitles(), SpecialUploadStash\showUploads(), SpecialRevisionDelete\submit(), SpecialEditWatchlist\submitNormal(), SpecialEditWatchlist\submitRaw(), SpecialRevisionDelete\success(), UserrightsPage\switchForm(), and SpecialRevisionDelete\tryShowFile().

SpecialPage::name ( x = null)

These mutators are very evil, as the relevant variables should not mutate.

So don't use them.

Parameters:
$xMixed
Returns:
Mixed
Deprecated:
since 1.18

Definition at line 450 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct().

static SpecialPage::removePage ( name) [static]

Remove a special page from the list Formerly used to disable expensive or dangerous special pages.

The preferred method is now to add a SpecialPage_initList hook.

Deprecated:
since 1.18
Parameters:
string$namethe page to remove

Definition at line 138 of file SpecialPage.php.

static SpecialPage::resolveAlias ( alias) [static]

Given a special page alias, return the special page name.

Returns false if there is no such alias.

Parameters:
$aliasString
Returns:
String or false
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 87 of file SpecialPage.php.

static SpecialPage::resolveAliasWithSubpage ( alias) [static]

Given a special page name with a possible subpage, return an array where the first element is the special page name and the second is the subpage.

Parameters:
$aliasString
Returns:
Array
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 102 of file SpecialPage.php.

SpecialPage::restriction ( x = null)

These mutators are very evil, as the relevant variables should not mutate.

So don't use them.

Parameters:
$xMixed
Returns:
Mixed
Deprecated:
since 1.18

Definition at line 462 of file SpecialPage.php.

SpecialPage::run ( subPage) [final]

Entry point.

Since:
1.20
Parameters:
$subPagestring|null

Definition at line 618 of file SpecialPage.php.

SpecialPage::setContext ( context)

Sets the context this SpecialPage is executed in.

Parameters:
$contextIContextSource
Since:
1.18

Definition at line 740 of file SpecialPage.php.

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

static SpecialPage::setGroup ( page,
group 
) [static]

Add a page to a certain display group for Special:SpecialPages.

Parameters:
$pageMixed: SpecialPage or string
$groupString
Deprecated:
since 1.18 call SpecialPageFactory method directly

Definition at line 113 of file SpecialPage.php.

SpecialPage::setListed ( listed)

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

Since:
r3583 (v1.3)
Parameters:
$listedBool
Returns:
Bool

Definition at line 422 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:
$userUser: the user to check
Returns:
Boolean: does the user have permission to view the page?

Reimplemented in SpecialUpload, SpecialPasswordReset, and UserrightsPage.

Definition at line 567 of file SpecialPage.php.

Referenced by DeletedContributionsPage\__construct().


Member Data Documentation

IContextSource SpecialPage::$mContext [protected]

Current request context.

Definition at line 59 of file SpecialPage.php.

SpecialPage::$mFile [private]

Definition at line 48 of file SpecialPage.php.

SpecialPage::$mFunction [private]

Definition at line 45 of file SpecialPage.php.

SpecialPage::$mIncludable [protected]

Definition at line 54 of file SpecialPage.php.

SpecialPage::$mIncluding [protected]

Definition at line 51 of file SpecialPage.php.

SpecialPage::$mListed [private]

Definition at line 42 of file SpecialPage.php.

SpecialPage::$mLocalName [private]

Definition at line 35 of file SpecialPage.php.

SpecialPage::$mName [protected]

Definition at line 32 of file SpecialPage.php.

SpecialPage::$mRestriction [private]

Definition at line 39 of file SpecialPage.php.


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