summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/doxygen_first_page.php2
-rw-r--r--docs/extension.schema.json131
-rw-r--r--docs/hooks.txt1282
-rw-r--r--docs/kss/styleguide-template/index.html5
-rw-r--r--docs/kss/styleguide-template/public/kss.less5
-rw-r--r--docs/linkcache.txt2
-rw-r--r--docs/memcached.txt1
-rw-r--r--docs/scripts.txt5
-rw-r--r--docs/sitelist.txt2
-rw-r--r--docs/uidesign/design.html1
10 files changed, 793 insertions, 643 deletions
diff --git a/docs/doxygen_first_page.php b/docs/doxygen_first_page.php
index 9949d133..77ae1dcf 100644
--- a/docs/doxygen_first_page.php
+++ b/docs/doxygen_first_page.php
@@ -1,5 +1,5 @@
<?php
-die("Not a valid entry point\n");
+die( "Not a valid entry point\n" );
/**
* This file does not hold any code. It is only there so we can generate
* the doxygen documentation main page.
diff --git a/docs/extension.schema.json b/docs/extension.schema.json
index 610e9c0e..218a19c3 100644
--- a/docs/extension.schema.json
+++ b/docs/extension.schema.json
@@ -3,6 +3,11 @@
"description": "MediaWiki extension.json schema",
"type": "object",
"properties": {
+ "manifest_version": {
+ "type": "integer",
+ "description": "Version of the extension.json schema the extension.json file is in.",
+ "required": true
+ },
"name": {
"type": "string",
"description": "The extension's canonical name.",
@@ -15,19 +20,7 @@
"type": {
"type": "string",
"description": "The extension's type, as an index to $wgExtensionCredits.",
- "default": "other",
- "enum": [
- "api",
- "antispam",
- "datavalues",
- "media",
- "parserhook",
- "semantic",
- "skin",
- "specialpage",
- "variable",
- "other"
- ]
+ "default": "other"
},
"author": {
"type": [
@@ -37,8 +30,7 @@
"description": "Extension's authors.",
"items": {
"type": "string"
- },
- "additionalItems": false
+ }
},
"version": {
"type": "string",
@@ -278,6 +270,16 @@
"Unlicense"
]
},
+ "requires": {
+ "type": "object",
+ "description": "Indicates what versions of MediaWiki core are required. This syntax may be extended in the future, for example to check dependencies between other extensions.",
+ "properties": {
+ "MediaWiki": {
+ "type": "string",
+ "description": "Version constraint string against MediaWiki core."
+ }
+ }
+ },
"ResourceFileModulePaths": {
"type": "object",
"description": "Default paths to use for all ResourceLoader file modules",
@@ -302,7 +304,7 @@
"description": "ResourceLoader modules to register",
"additionalProperties": false,
"patternProperties": {
- "^[a-zA-Z0-9\\.]+$": {
+ "^[a-zA-Z0-9-\\.]+$": {
"type": "object",
"description": "A single ResourceLoader module descriptor",
"properties": {
@@ -319,7 +321,7 @@
"description": "Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath"
},
"scripts": {
- "type": "array",
+ "type": ["string", "array"],
"description": "Scripts to always include (array of file paths)",
"items": {
"type": "string"
@@ -356,28 +358,28 @@
}
},
"debugScripts": {
- "type": "array",
+ "type": ["string", "array"],
"description": "Scripts to include in debug contexts",
"items": {
"type": "string"
}
},
"loaderScripts": {
- "type": "array",
+ "type": ["string", "array"],
"description": "Scripts to include in the startup module",
"items": {
"type": "string"
}
},
"dependencies": {
- "type": "array",
+ "type": ["string", "array"],
"description": "Modules which must be loaded before this module",
"items": {
"type": "string"
}
},
"styles": {
- "type": "array",
+ "type": ["string", "array", "object"],
"description": "Styles to always load",
"items": {
"type": "string"
@@ -399,7 +401,7 @@
}
},
"messages": {
- "type": "array",
+ "type": ["string", "array"],
"description": "Messages to always load",
"items": {
"type": "string"
@@ -416,6 +418,10 @@
"bottom",
"top"
]
+ },
+ "templates": {
+ "type": "object",
+ "description": "Templates to be loaded for client-side usage"
}
}
}
@@ -433,10 +439,6 @@
"type": "object",
"description": "ResourceLoader LESS variables"
},
- "ResourceLoaderLESSFunctions": {
- "type": "object",
- "description": "ResourceLoader LESS functions"
- },
"ResourceLoaderLESSImportPaths": {
"type": "object",
"description": "ResourceLoader import paths"
@@ -446,40 +448,52 @@
"description": "Registry of factory functions to create Config objects"
},
"namespaces": {
- "type": "object",
+ "type": "array",
"description": "Method to add extra namespaces",
- "properties": {
- "id": {
- "type": "integer"
- },
- "constant": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "gender": {
- "type": "object",
- "properties": {
- "male": {
- "type": "string"
- },
- "female": {
- "type": "string"
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "constant": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "gender": {
+ "type": "object",
+ "properties": {
+ "male": {
+ "type": "string"
+ },
+ "female": {
+ "type": "string"
+ }
}
+ },
+ "subpages": {
+ "type": "boolean",
+ "default": false
+ },
+ "content": {
+ "type": "boolean",
+ "default": false
+ },
+ "defaultcontentmodel": {
+ "type": "string"
+ },
+ "protection": {
+ "type": ["string", "array"],
+ "description": "Userright(s) required to edit in this namespace"
+ },
+ "capitallinkoverride": {
+ "type": "boolean",
+ "description": "Set $wgCapitalLinks on a per-namespace basis"
}
},
- "subpages": {
- "type": "boolean",
- "default": false
- },
- "content": {
- "type": "boolean",
- "default": false
- },
- "defaultcontentmodel": {
- "type": "string"
- }
+ "required": ["id", "constant", "name"]
}
},
"TrackingCategories": {
@@ -583,7 +597,7 @@
"type": "object"
},
"FilterLogTypes": {
- "type": "array"
+ "type": "object"
},
"LogNames": {
"type": "object"
@@ -618,6 +632,9 @@
"ValidSkinNames": {
"type": "object"
},
+ "SkinOOUIThemes": {
+ "type": "object"
+ },
"callback": {
"type": [
"array",
diff --git a/docs/hooks.txt b/docs/hooks.txt
index e9c0e205..7671e6e3 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -52,8 +52,8 @@ An extension writer, or a local admin, will often add custom code to the
function -- with or without a global variable. For example, someone wanting
email notification when an article is shown may add:
- function showAnArticle( $article ) {
- global $wgReverseTitle, $wgCapitalizeTitle, $wgNotifyArticle;
+ function showAnArticle( $article ) {
+ global $wgReverseTitle, $wgCapitalizeTitle, $wgNotifyArticle;
if ( $wgReverseTitle ) {
wfReverseTitle( $article );
@@ -247,6 +247,12 @@ $user: the User object about to be created (read-only, incomplete)
$autoblockip: The IP going to be autoblocked.
$block: The block from which the autoblock is coming.
+'AbortChangePassword': Return false to cancel password change.
+$user: the User object to which the password change is occuring
+$mOldpass: the old password provided by the user
+$newpass: the new password provided by the user
+&$abortMsg: the message identifier for abort reason
+
'AbortDiffCache': Can be used to cancel the caching of a diff.
&$diffEngine: DifferenceEngine object
@@ -259,32 +265,24 @@ $rc: The current RecentChange object.
$user: the User object being authenticated against
$password: the password being submitted, not yet checked for validity
&$retval: a LoginForm class constant to return from authenticateUserData();
- default is LoginForm::ABORTED. Note that the client may be using
- a machine API rather than the HTML user interface.
-&$msg: the message identifier for abort reason (new in 1.18, not available before 1.18)
+ default is LoginForm::ABORTED. Note that the client may be using a machine
+ API rather than the HTML user interface.
+&$msg: the message identifier for abort reason (new in 1.18, not available
+ before 1.18)
'AbortNewAccount': Return false to cancel explicit account creation.
$user: the User object about to be created (read-only, incomplete)
&$msg: out parameter: HTML to display on abort
-&$status: out parameter: Status object to return, replaces the older $msg param (added in 1.23)
- Create the object with Status::newFatal() to ensure proper API error messages
- are returned when creating account through API clients.
+&$status: out parameter: Status object to return, replaces the older $msg param
+ (added in 1.23)
+ Create the object with Status::newFatal() to ensure proper API error
+ messages are returned when creating account through API clients.
-'AbortTalkPageEmailNotification': Return false to cancel talk page email notification
+'AbortTalkPageEmailNotification': Return false to cancel talk page email
+notification
$targetUser: the user whom to send talk page email notification
$title: the page title
-'SendWatchlistEmailNotification': Return true to send watchlist email notification
-$targetUser: the user whom to send watchlist email notification
-$title: the page title
-$enotif: EmailNotification object
-
-'AbortChangePassword': Return false to cancel password change.
-$user: the User object to which the password change is occuring
-$mOldpass: the old password provided by the user
-$newpass: the new password provided by the user
-&$abortMsg: the message identifier for abort reason
-
'ActionBeforeFormDisplay': Before executing the HTMLForm object.
$name: name of the action
&$form: HTMLForm object
@@ -300,7 +298,8 @@ $article: Article object
$user: the User object that was created. (Parameter added in 1.7)
$byEmail: true when account was created "by email" (added in 1.12)
-'AddNewAccountApiForm': Allow modifying internal login form when creating an account via API.
+'AddNewAccountApiForm': Allow modifying internal login form when creating an
+account via API.
$apiModule: the ApiCreateAccount module calling
$loginForm: the LoginForm used
@@ -326,7 +325,7 @@ $pageInfo: associative array of page information
just before adding its HTML to parser output.
$parser: Parser object that called the hook
$ig: Gallery, an object of one of the gallery classes (inheriting from
-ImageGalleryBase)
+ ImageGalleryBase)
$html: HTML generated by the gallery
'AlternateEdit': Before checking if a user can edit a page and before showing
@@ -335,12 +334,12 @@ $editPage: the EditPage object
'AlternateEditPreview': Before generating the preview of the page when editing
( EditPage::getPreviewText() ).
+Return false and set $previewHTML and $parserOutput to output custom page
+preview HTML.
$editPage: the EditPage object
&$content: the Content object for the text field from the edit page
&$previewHTML: Text to be placed into the page for the preview
&$parserOutput: the ParserOutput object for the preview
-return false and set $previewHTML and $parserOutput to output custom page
-preview HTML.
'AlternateUserMailer': Called before mail is sent so that mail could be logged
(or something else) instead of using PEAR or PHP's mail(). Return false to skip
@@ -366,25 +365,26 @@ false and set a message to cancel the request.
$module: Module object
$user: Current user
&$message: API usage message to die with, as a message key or array
-as accepted by ApiBase::dieUsageMsg.
+ as accepted by ApiBase::dieUsageMsg.
'APIEditBeforeSave': Before saving a page with api.php?action=edit, after
processing request parameters. Return false to let the request fail, returning
an error message or an <edit result="Failure"> tag if $resultArr was filled.
-$editPage : the EditPage object
-$text : the new text of the article (has yet to be saved)
-&$resultArr : data in this array will be added to the API result
+$editPage: the EditPage object
+$text: the new text of the article (has yet to be saved)
+&$resultArr: data in this array will be added to the API result
'ApiFeedContributions::feedItem': Called to convert the result of ContribsPager
into a FeedItem instance that ApiFeedContributions can consume. Implementors of
this hook may cancel the hook to signal that the item is not viewable in the
provided context.
-$row: A row of data from ContribsPager. The set of data returned by ContribsPager
- can be adjusted by handling the ContribsPager::reallyDoQuery hook.
+$row: A row of data from ContribsPager. The set of data returned by
+ ContribsPager can be adjusted by handling the ContribsPager::reallyDoQuery
+ hook.
$context: An IContextSource implementation.
-&$feedItem: Set this to a FeedItem instance if the callback can handle the provided
- row. This is provided to the hook as a null, if it is non null then another callback
- has already handled the hook.
+&$feedItem: Set this to a FeedItem instance if the callback can handle the
+ provided row. This is provided to the hook as a null, if it is non null then
+ another callback has already handled the hook.
'ApiFormatHighlight': Use to syntax-highlight API pretty-printed output. When
highlighting, add output to $context->getOutput() and return false.
@@ -407,12 +407,14 @@ Use this hook to modify a module's description.
$module: ApiBase Module object
&$msg: Array of Message objects
-'APIGetParamDescription': DEPRECATED! Use APIGetParamDescriptionMessages instead.
+'APIGetParamDescription': DEPRECATED! Use APIGetParamDescriptionMessages
+instead.
Use this hook to modify a module's parameter descriptions.
&$module: ApiBase Module object
&$desc: Array of parameter descriptions
-'APIGetParamDescriptionMessages': Use this hook to modify a module's parameter descriptions.
+'APIGetParamDescriptionMessages': Use this hook to modify a module's parameter
+descriptions.
$module: ApiBase Module object
&$msg: Array of arrays of Message objects
@@ -420,23 +422,30 @@ $module: ApiBase Module object
$module: ApiBase Module object
&$help: Array of HTML strings to be joined for the output.
$options: Array Options passed to ApiHelp::getHelp
+&$tocData: Array If a TOC is being generated, this array has keys as anchors in
+ the page and values as for Linker::generateTOC().
'ApiMain::moduleManager': Called when ApiMain has finished initializing its
module manager. Can be used to conditionally register API modules.
$moduleManager: ApiModuleManager Module manager instance
+'ApiMain::onException': Called by ApiMain::executeActionWithErrorHandling() when
+an exception is thrown during API action execution.
+$apiMain: Calling ApiMain instance.
+$e: Exception object.
+
'ApiOpenSearchSuggest': Called when constructing the OpenSearch results. Hooks
can alter or append to the array.
&$results: array with integer keys to associative arrays. Keys in associative
-array:
- - title: Title object.
- - redirect from: Title or null.
- - extract: Description for this result.
- - extract trimmed: If truthy, the extract will not be trimmed to
- $wgOpenSearchDescriptionLength.
- - image: Thumbnail for this result. Value is an array with subkeys 'source'
- (url), 'width', 'height', 'alt', 'align'.
- - url: Url for the given title.
+ array:
+ - title: Title object.
+ - redirect from: Title or null.
+ - extract: Description for this result.
+ - extract trimmed: If truthy, the extract will not be trimmed to
+ $wgOpenSearchDescriptionLength.
+ - image: Thumbnail for this result. Value is an array with subkeys 'source'
+ (url), 'width', 'height', 'alt', 'align'.
+ - url: Url for the given title.
'ApiQuery::moduleManager': Called when ApiQuery has finished initializing its
module manager. Can be used to conditionally register API query modules.
@@ -462,6 +471,19 @@ just add your callback to the $tokenFunctions array and return true (returning
false makes no sense).
$tokenFunctions: array(action => callback)
+'APIQueryRecentChangesTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes
+instead.
+Use this hook to add custom tokens to list=recentchanges. Every token has an
+action, which will be used in the rctoken parameter and in the output
+(actiontoken="..."), and a callback function which should return the token, or
+false if the user isn't allowed to obtain it. The prototype of the callback
+function is func($pageid, $title, $rc), where $pageid is the page ID of the
+page associated to the revision the token is requested for, $title the
+associated Title object and $rc the associated RecentChange object. In the
+hook, just add your callback to the $tokenFunctions array and return true
+(returning false makes no sense).
+$tokenFunctions: array(action => callback)
+
'APIQueryRevisionsTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead.
Use this hook to add custom tokens to prop=revisions. Every token has an
action, which will be used in the rvtoken parameter and in the output
@@ -474,18 +496,6 @@ just add your callback to the $tokenFunctions array and return true (returning
false makes no sense).
$tokenFunctions: array(action => callback)
-'APIQueryRecentChangesTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead.
-Use this hook to add custom tokens to list=recentchanges. Every token has an
-action, which will be used in the rctoken parameter and in the output
-(actiontoken="..."), and a callback function which should return the token, or
-false if the user isn't allowed to obtain it. The prototype of the callback
-function is func($pageid, $title, $rc), where $pageid is the page ID of the
-page associated to the revision the token is requested for, $title the
-associated Title object and $rc the associated RecentChange object. In the
-hook, just add your callback to the $tokenFunctions array and return true
-(returning false makes no sense).
-$tokenFunctions: array(action => callback)
-
'APIQuerySiteInfoGeneralInfo': Use this hook to add extra information to the
sites general information.
$module: the current ApiQuerySiteInfo module
@@ -510,11 +520,6 @@ your callback to the $tokenFunctions array and return true (returning false
makes no sense).
$tokenFunctions: array(action => callback)
-'ApiMain::onException': Called by ApiMain::executeActionWithErrorHandling() when
-an exception is thrown during API action execution.
-$apiMain: Calling ApiMain instance.
-$e: Exception object.
-
'ApiRsdServiceApis': Add or remove APIs from the RSD services list. Each service
should have its own entry in the $apis array and have a unique name, passed as
key for the array that represents the service data. In this data array, the
@@ -524,17 +529,18 @@ key-value-pair identified by the apiLink key is required.
'ApiTokensGetTokenTypes': DEPRECATED! Use ApiQueryTokensRegisterTypes instead.
Use this hook to extend action=tokens with new token types.
&$tokenTypes: supported token types in format 'type' => callback function
-used to retrieve this type of tokens.
+ used to retrieve this type of tokens.
'Article::MissingArticleConditions': Before fetching deletion & move log entries
to display a message of a non-existing page being deleted/moved, give extensions
a chance to hide their (unrelated) log entries.
&$conds: Array of query conditions (all of which have to be met; conditions will
-AND in the final query)
+ AND in the final query)
$logTypes: Array of log types being queried
-'ArticleAfterFetchContent': After fetching content of an article from the
-database. DEPRECATED, use ArticleAfterFetchContentObject instead.
+'ArticleAfterFetchContent': DEPRECATED! Use ArticleAfterFetchContentObject
+instead.
+After fetching content of an article from the database.
$article: the article (object) being loaded from the database
&$content: the content (string) of the article
@@ -554,6 +560,13 @@ this to change the content in this area or how it is loaded.
$diffEngine: the DifferenceEngine
$output: the OutputPage object
+'ArticleContentViewCustom': Allows to output the text of the article in a
+different format than wikitext. Note that it is preferable to implement proper
+handing for a custom data type using the ContentHandler facility.
+$content: content of the page, as a Content object
+$title: title of the page
+$output: reference to $wgOut
+
'ArticleDelete': Before an article is deleted.
$wikiPage: the WikiPage (object) being deleted
$user: the user (object) deleting the article
@@ -584,7 +597,7 @@ $recipient: User (object) who's talk page was edited
article has been changed.
$wikiPage: the WikiPage (object)
$editInfo: data holder that includes the parser output ($editInfo->output) for
-that page after the change
+ that page after the change
$changed: bool for if the page was changed
'ArticleEditUpdatesDeleteFromRecentchanges': Before deleting old entries from
@@ -597,8 +610,8 @@ $title: Title (object) used to create the article object
$article: Article (object) that will be returned
$context: IContextSource (object)
-'ArticleInsertComplete': After a new article is created. DEPRECATED, use
-PageContentInsertComplete.
+'ArticleInsertComplete': DEPRECATED! Use PageContentInsertComplete.
+After a new article is created.
$wikiPage: WikiPage created
$user: User creating the article
$text: New content
@@ -642,23 +655,24 @@ $moveonly: boolean whether it was for move only or not
'ArticlePurge': Before executing "&action=purge".
$wikiPage: WikiPage (object) to purge
-'ArticleRevisionVisibilitySet': Called when changing visibility of one or more
-revisions of an article.
-&$title: Title object of the article
-
'ArticleRevisionUndeleted': After an article revision is restored.
$title: the article title
$revision: the revision
$oldPageID: the page ID of the revision when archived (may be null)
+'ArticleRevisionVisibilitySet': Called when changing visibility of one or more
+revisions of an article.
+$title: Title object of the article
+$ids: Ids to set the visibility for
+
'ArticleRollbackComplete': After an article rollback is completed.
$wikiPage: the WikiPage that was edited
$user: the user who did the rollback
$revision: the revision the page was reverted back to
$current: the reverted revision
-'ArticleSave': Before an article is saved. DEPRECATED, use PageContentSave
-instead.
+'ArticleSave': DEPRECATED! Use PageContentSave instead.
+Before an article is saved.
$wikiPage: the WikiPage (object) being saved
$user: the user (object) saving the article
$text: the new article text
@@ -667,8 +681,8 @@ $isminor: minor flag
$iswatch: watch flag
$section: section #
-'ArticleSaveComplete': After an article has been updated. DEPRECATED, use
-PageContentSaveComplete instead.
+'ArticleSaveComplete': DEPRECATED! Use PageContentSaveComplete instead.
+After an article has been updated.
$wikiPage: WikiPage modified
$user: User performing the modification
$text: New content
@@ -699,6 +713,14 @@ the user is redirected back to the page.
&$sectionanchor: The section anchor link (e.g. "#overview" )
&$extraq: Extra query parameters which can be added via hooked functions
+'ArticleViewCustom': DEPRECATED! Use ArticleContentViewCustom instead.
+Allows to output the text of the article in a different format than wikitext.
+Note that it is preferable to implement proper handing for a custom data type
+using the ContentHandler facility.
+$text: text of the page
+$title: title of the page
+$output: reference to $wgOut
+
'ArticleViewFooter': After showing the footer section of an ordinary page view
$article: Article object
$patrolFooterShown: boolean whether patrol footer is shown
@@ -707,28 +729,14 @@ $patrolFooterShown: boolean whether patrol footer is shown
viewing.
&$article: the article
&$pcache: whether to try the parser cache or not
-&$outputDone: whether the output for this page finished or not. Set to a ParserOutput
-object to both indicate that the output is done and what parser output was used.
+&$outputDone: whether the output for this page finished or not. Set to
+ a ParserOutput object to both indicate that the output is done and what
+ parser output was used.
'ArticleViewRedirect': Before setting "Redirected from ..." subtitle when a
redirect was followed.
$article: target article (object)
-'ArticleViewCustom': Allows to output the text of the article in a different
-format than wikitext. DEPRECATED, use ArticleContentViewCustom instead. Note
-that it is preferable to implement proper handing for a custom data type using
-the ContentHandler facility.
-$text: text of the page
-$title: title of the page
-$output: reference to $wgOut
-
-'ArticleContentViewCustom': Allows to output the text of the article in a
-different format than wikitext. Note that it is preferable to implement proper
-handing for a custom data type using the ContentHandler facility.
-$content: content of the page, as a Content object
-$title: title of the page
-$output: reference to $wgOut
-
'AuthPluginAutoCreate': Called when creating a local account for an user logged
in from an external authentication method.
$user: User object created locally
@@ -743,16 +751,16 @@ $args: arguments
$user: user
$result: result of checking autopromote condition
-'BacklinkCacheGetPrefix': Allows to set prefix for a specific link table.
-$table: table name
-&$prefix: prefix
-
'BacklinkCacheGetConditions': Allows to set conditions for query when links to
certain title are fetched.
$table: table name
$title: title of the page to which backlinks are sought
&$conds: query conditions
+'BacklinkCacheGetPrefix': Allows to set prefix for a specific link table.
+$table: table name
+&$prefix: prefix
+
'BadImage': When checking against the bad image list. Change $bad and return
false to override. If an image is "bad", it is not rendered inline in wiki
pages or galleries in category pages.
@@ -765,10 +773,27 @@ $template BaseTemplate
$portlet: string portlet name
&$html: string
+'BaseTemplateToolbox': Called by BaseTemplate when building the $toolbox array
+and returning it for the skin to output. You can add items to the toolbox while
+still letting the skin make final decisions on skin-specific markup conventions
+using this hook.
+&$sk: The BaseTemplate base skin template
+&$toolbox: An array of toolbox items, see BaseTemplate::getToolbox and
+ BaseTemplate::makeListItem for details on the format of individual items
+ inside of this array.
+
'BeforeDisplayNoArticleText': Before displaying message key "noarticletext" or
"noarticletext-nopermission" at Article::showMissingArticle().
$article: article object
+'BeforeHttpsRedirect': Prior to forcing HTTP->HTTPS redirect. Gives a chance to
+override how the redirect is output by modifying, or by returning false, and
+letting standard HTTP rendering take place.
+ATTENTION: This hook is likely to be removed soon due to overall design of the
+system.
+$context: IContextSource object
+&$redirect: string URL, modifiable
+
'BeforeInitialize': Before anything is initialized in
MediaWiki::performRequest().
&$title: Title being used for request
@@ -782,13 +807,6 @@ $mediaWiki: Mediawiki object
&$out: OutputPage object
&$skin: Skin object
-'BeforeHttpsRedirect': Prior to forcing HTTP->HTTPS redirect. Gives a chance to
-override how the redirect is output by modifying, or by returning false, and
-letting standard HTTP rendering take place.
-ATTENTION: This hook is likely to be removed soon due to overall design of the system.
-$context: IContextSource object
-&$redirect: string URL, modifiable
-
'BeforePageRedirect': Prior to sending an HTTP redirect. Gives a chance to
override how the redirect is output by modifying, or by returning false and
taking over the output.
@@ -820,13 +838,6 @@ newly created user.
&$injected_html: Any HTML to inject after the "logged in" message of a newly
created user account
-'BitmapHandlerTransform': before a file is transformed, gives extension the
-possibility to transform it themselves
-$handler: BitmapHandler
-$image: File
-&$scalerParams: Array with scaler parameters
-&$mto: null, set to a MediaTransformOutput
-
'BitmapHandlerCheckImageArea': By BitmapHandler::normaliseParams, after all
normalizations have been performed, except for the $wgMaxImageArea check.
$image: File
@@ -834,10 +845,12 @@ $image: File
&$checkImageAreaHookResult: null, set to true or false to override the
$wgMaxImageArea check result.
-'PerformRetroactiveAutoblock': Called before a retroactive autoblock is applied
-to a user.
-$block: Block object (which is set to be autoblocking)
-&$blockIds: Array of block IDs of the autoblock
+'BitmapHandlerTransform': before a file is transformed, gives extension the
+possibility to transform it themselves
+$handler: BitmapHandler
+$image: File
+&$scalerParams: Array with scaler parameters
+&$mto: null, set to a MediaTransformOutput
'BlockIp': Before an IP address or user is blocked.
$block: the Block object about to be saved
@@ -856,7 +869,7 @@ $output: OutputPage object in use
to be able to access the wiki via HTTPS.
$ip: The IP address in human-readable form
&$canDo: This reference should be set to false if the client may not be able
-to use HTTPS
+ to use HTTPS
'CanonicalNamespaces': For extensions adding their own namespaces or altering
the defaults.
@@ -893,13 +906,18 @@ $type: The category type. Either 'page', 'img' or 'subcat'
$title: Title object for the categorized page
$html: Requested html content of anchor
&$link: Returned value. When set to a non-null value by a hook subscriber
-this value will be used as the anchor instead of Linker::link
+ this value will be used as the anchor instead of Linker::link
'ChangePasswordForm': For extensions that need to add a field to the
ChangePassword form via the Preferences form.
&$extraFields: An array of arrays that hold fields like would be passed to the
pretty function.
+'ChangesListInitRows': Batch process change list rows prior to rendering.
+$changesList: ChangesList instance
+$rows: The data that will be rendered. May be a ResultWrapper instance or
+ an array.
+
'ChangesListInsertArticleLink': Override or augment link to article in RC list.
&$changesList: ChangesList instance.
&$articlelink: HTML of link to article (already filled-in).
@@ -908,18 +926,17 @@ ChangePassword form via the Preferences form.
$unpatrolled: Whether or not we are showing unpatrolled changes.
$watched: Whether or not the change is watched by the user.
-'ChangesListInitRows': Batch process change list rows prior to rendering.
-$changesList: ChangesList instance
-$rows: The data that will be rendered. May be a ResultWrapper instance or
- an array.
-
-'ChangesListSpecialPageFilters': Called after building form options on pages inheriting from ChangesListSpecialPage (in core: RecentChanges, RecentChangesLinked and Watchlist).
+'ChangesListSpecialPageFilters': Called after building form options on pages
+inheriting from ChangesListSpecialPage (in core: RecentChanges,
+RecentChangesLinked and Watchlist).
$special: ChangesListSpecialPage instance
&$filters: associative array of filter definitions. The keys are the HTML
name/URL parameters. Each key maps to an associative array with a 'msg'
(message key) and a 'default' value.
-'ChangesListSpecialPageQuery': Called when building SQL query on pages inheriting from ChangesListSpecialPage (in core: RecentChanges, RecentChangesLinked and Watchlist).
+'ChangesListSpecialPageQuery': Called when building SQL query on pages
+inheriting from ChangesListSpecialPage (in core: RecentChanges,
+RecentChangesLinked and Watchlist).
$name: name of the special page, e.g. 'Watchlist'
&$tables: array of tables to be queried
&$fields: array of columns to select
@@ -960,14 +977,6 @@ $user: user initiating the action
uses are in active use.
&$tags: list of all active tags. Append to this array.
-'LoginUserMigrated': Called during login to allow extensions the opportunity to
-inform a user that their username doesn't exist for a specific reason, instead
-of letting the login form give the generic error message that the account does
-not exist. For example, when the account has been renamed or deleted.
-$user: the User object being authenticated against.
-&$msg: the message identifier for abort reason, or an array to pass a message
- key and parameters.
-
'Collation::factory': Called if $wgCategoryCollation is an unknown collation.
$collationName: Name of the collation in question
&$collationObject: Null. Replace with a subclass of the Collation class that
@@ -977,24 +986,14 @@ $collationName: Name of the collation in question
successfully.
$user: user (object) whose email is being confirmed
-'ContentHandlerDefaultModelFor': Called when the default content model is determined
-for a given title. May be used to assign a different model for that title.
-$title: the Title in question
-&$model: the model name. Use with CONTENT_MODEL_XXX constants.
-
-'ContentHandlerForModelID': Called when a ContentHandler is requested for a given
-content model name, but no entry for that model exists in $wgContentHandlers.
-$modeName: the requested content model name
-&$handler: set this to a ContentHandler object, if desired.
-
-'ContentModelCanBeUsedOn': Called to determine whether that content model can
-be used on a given page. This is especially useful to prevent some content models
-to be used in some special location.
-$contentModel: ID of the content model in question
-$title: the Title in question.
-&$ok: Output parameter, whether it is OK to use $contentModel on $title.
-Handler functions that modify $ok should generally return false to prevent further
-hooks from further modifying $ok.
+'ContentAlterParserOutput': Modify parser output for a given content object.
+Called by Content::getParserOutput after parsing has finished. Can be used
+for changes that depend on the result of the parsing but have to be done
+before LinksUpdate is called (such as adding tracking categories based on
+the rendered HTML).
+$content: The Content to render
+$title: Title of the page, as context
+$parserOutput: ParserOutput to manipulate
'ContentGetParserOutput': Customize parser output for a given content object,
called by AbstractContent::getParserOutput. May be used to override the normal
@@ -1003,36 +1002,40 @@ $content: The Content to render
$title: Title of the page, as context
$revId: The revision ID, as context
$options: ParserOptions for rendering. To avoid confusing the parser cache,
-the output can only depend on parameters provided to this hook function, not on global state.
-$generateHtml: boolean, indicating whether full HTML should be generated. If false,
-generation of HTML may be skipped, but other information should still be present in the
-ParserOutput object.
+ the output can only depend on parameters provided to this hook function, not
+ on global state.
+$generateHtml: boolean, indicating whether full HTML should be generated. If
+ false, generation of HTML may be skipped, but other information should still
+ be present in the ParserOutput object.
&$output: ParserOutput, to manipulate or replace
-'ContentAlterParserOutput': Modify parser output for a given content object.
-Called by Content::getParserOutput after parsing has finished. Can be used
-for changes that depend on the result of the parsing but have to be done
-before LinksUpdate is called (such as adding tracking categories based on
-the rendered HTML).
-$content: The Content to render
-$title: Title of the page, as context
-$parserOutput: ParserOutput to manipulate
+'ContentHandlerDefaultModelFor': Called when the default content model is
+determined for a given title. May be used to assign a different model for that
+title.
+$title: the Title in question
+&$model: the model name. Use with CONTENT_MODEL_XXX constants.
-'ConvertContent': Called by AbstractContent::convert when a conversion to another
-content model is requested.
-$content: The Content object to be converted.
-$toModel: The ID of the content model to convert to.
-$lossy: boolean indicating whether lossy conversion is allowed.
-&$result: Output parameter, in case the handler function wants to provide a
-converted Content object. Note that $result->getContentModel() must return $toModel.
-Handler functions that modify $result should generally return false to further
-attempts at conversion.
+'ContentHandlerForModelID': Called when a ContentHandler is requested for
+a given content model name, but no entry for that model exists in
+$wgContentHandlers.
+$modeName: the requested content model name
+&$handler: set this to a ContentHandler object, if desired.
+
+'ContentModelCanBeUsedOn': Called to determine whether that content model can
+be used on a given page. This is especially useful to prevent some content
+models to be used in some special location.
+$contentModel: ID of the content model in question
+$title: the Title in question.
+&$ok: Output parameter, whether it is OK to use $contentModel on $title.
+ Handler functions that modify $ok should generally return false to prevent
+ further hooks from further modifying $ok.
'ContribsPager::getQueryInfo': Before the contributions query is about to run
&$pager: Pager object for contributions
&$queryInfo: The query for the contribs Pager
-'ContribsPager::reallyDoQuery': Called before really executing the query for My Contributions
+'ContribsPager::reallyDoQuery': Called before really executing the query for My
+Contributions
&$data: an array of results of all contribs queries
$pager: The ContribsPager object hooked into
$offset: Index offset, inclusive
@@ -1050,18 +1053,28 @@ $id: User identifier
$title: User page title
&$tools: Array of tool links
+'ConvertContent': Called by AbstractContent::convert when a conversion to
+another content model is requested.
+Handler functions that modify $result should generally return false to disable
+further attempts at conversion.
+$content: The Content object to be converted.
+$toModel: The ID of the content model to convert to.
+$lossy: boolean indicating whether lossy conversion is allowed.
+&$result: Output parameter, in case the handler function wants to provide a
+ converted Content object. Note that $result->getContentModel() must return
+ $toModel.
+
'CustomEditor': When invoking the page editor
+Return true to allow the normal editor to be used, or false if implementing
+a custom editor, e.g. for a special namespace, etc.
$article: Article being edited
$user: User performing the edit
-Return true to allow the normal editor to be used, or false
-if implementing a custom editor, e.g. for a special namespace,
-etc.
-
'DatabaseOraclePostInit': Called after initialising an Oracle database
&$db: the DatabaseOracle object
-'DeletedContribsPager::reallyDoQuery': Called before really executing the query for Special:DeletedContributions
+'DeletedContribsPager::reallyDoQuery': Called before really executing the query
+for Special:DeletedContributions
Similar to ContribsPager::reallyDoQuery
&$data: an array of results of all contribs queries
$pager: The DeletedContribsPager object hooked into
@@ -1069,29 +1082,14 @@ $offset: Index offset, inclusive
$limit: Exact query limit
$descending: Query direction, false for ascending, true for descending
-'DeletedContributionsLineEnding': Called before a DeletedContributions HTML line is finished.
+'DeletedContributionsLineEnding': Called before a DeletedContributions HTML line
+is finished.
Similar to ContributionsLineEnding
$page: SpecialPage object for DeletedContributions
&$ret: the HTML line
$row: the DB row for this line
&$classes: the classes to add to the surrounding <li>
-'NewDifferenceEngine': Called when a new DifferenceEngine object is made
-$title: the diff page title (nullable)
-&$oldId: the actual old Id to use in the diff
-&$newId: the actual new Id to use in the diff (0 means current)
-$old: the ?old= param value from the url
-$new: the ?new= param value from the url
-
-'GetDifferenceEngine': Called when getting a new difference engine interface object
-Return false for valid object in $differenceEngine or true for the default difference engine
-$context: IContextSource context to be used for diff
-$old: Revision ID to show and diff with
-$new: Either a revision ID or one of the strings 'cur', 'prev' or 'next'
-$refreshCache: If set, refreshes the diff cache
-$unhide: If set, allow viewing deleted revs
-&$differenceEngine: output parameter, difference engine object to be used for diff
-
'DiffRevisionTools': Override or extend the revision tools available from the
diff view, i.e. undo, etc.
$newRev: Revision object of the "new" revision
@@ -1108,8 +1106,8 @@ an article
$article: article (object) being viewed
$oldid: oldid (int) being viewed
-'DoEditSectionLink': Override the HTML generated for section edit links
-* Deprecated in favour of SkinEditSectionLinks hook *
+'DoEditSectionLink': DEPRECATED! Use SkinEditSectionLinks instead.
+Override the HTML generated for section edit links
$skin: Skin object rendering the UI
$title: Title object for the title being linked to (may not be the same as
the page title, if the section is included from a template)
@@ -1128,20 +1126,21 @@ $section: Section being edited
&$error: Error message to return
$summary: Edit summary for page
-'EditFilterMerged': Post-section-merge edit filter.
-DEPRECATED, use EditFilterMergedContent instead.
+'EditFilterMerged': DEPRECATED! Use EditFilterMergedContent instead.
+Post-section-merge edit filter.
$editor: EditPage instance (object)
$text: content of the edit box
&$error: error message to return
$summary: Edit summary for page
'EditFilterMergedContent': Post-section-merge edit filter.
-This may be triggered by the EditPage or any other facility that modifies page content.
-Use the $status object to indicate whether the edit should be allowed, and to provide
-a reason for disallowing it. Return false to abort the edit, and true to continue.
-Returning true if $status->isOK() returns false means "don't save but continue user
-interaction", e.g. show the edit form. $status->apiHookResult can be set to an array
-to be returned by api.php action=edit. This is used to deliver captchas.
+This may be triggered by the EditPage or any other facility that modifies page
+content. Use the $status object to indicate whether the edit should be allowed,
+and to provide a reason for disallowing it. Return false to abort the edit, and
+true to continue. Returning true if $status->isOK() returns false means "don't
+save but continue user interaction", e.g. show the edit form.
+$status->apiHookResult can be set to an array to be returned by api.php
+action=edit. This is used to deliver captchas.
$context: object implementing the IContextSource interface.
$content: content of the edit box, as a Content object.
$status: Status object to represent errors, etc.
@@ -1149,15 +1148,15 @@ $summary: Edit summary for page
$user: the User object representing the user whois performing the edit.
$minoredit: whether the edit was marked as minor by the user.
+'EditFormInitialText': Allows modifying the edit form when editing existing
+pages
+$editPage: EditPage object
+
'EditFormPreloadText': Allows population of the edit form when creating
new pages
&$text: Text to preload with
&$title: Title object representing the page being created
-'EditFormInitialText': Allows modifying the edit form when editing existing
-pages
-$editPage: EditPage object
-
'EditPage::attemptSave': Called before an article is
saved, that is before WikiPage::doEditContent() is called
$editpage_Obj: the current EditPage object
@@ -1174,31 +1173,30 @@ $request: Webrequest
return value is ignored (should always return true)
'EditPage::showEditForm:fields': allows injection of form field into edit form
+Return value is ignored (should always return true)
$editor: the EditPage instance for reference
$out: an OutputPage instance to write to
-return value is ignored (should always return true)
'EditPage::showEditForm:initial': before showing the edit form
-$editor: EditPage instance (object)
-$out: an OutputPage instance to write to
-
Return false to halt editing; you'll need to handle error messages, etc.
yourself. Alternatively, modifying $error and returning true will cause the
contents of $error to be echoed at the top of the edit form as wikitext.
Return true without altering $error to allow the edit to proceed.
+$editor: EditPage instance (object)
+$out: an OutputPage instance to write to
'EditPage::showReadOnlyForm:initial': similar to EditPage::showEditForm:initial
but for the read-only 'view source' variant of the edit form.
+Return value is ignored (should always return true)
$editor: EditPage instance (object)
&$out: an OutputPage instance to write to
-return value is ignored (should always return true)
'EditPage::showStandardInputs:options': allows injection of form fields into
the editOptions area
+Return value is ignored (should always be true)
$editor: EditPage instance (object)
$out: an OutputPage instance to write to
&$tabindex: HTML tabindex of the last edit check/button
-return value is ignored (should always be true)
'EditPageBeforeConflictDiff': allows modifying the EditPage object and output
when there's an edit conflict. Return false to halt normal diff output; in
@@ -1230,25 +1228,18 @@ $title: title of page being edited
&$msg: localization message name, overridable. Default is either
'copyrightwarning' or 'copyrightwarning2'.
-'EditPageGetDiffText': DEPRECATED. Use EditPageGetDiffContent instead. Allow
-modifying the wikitext that will be used in "Show changes". Note that it is
-preferable to implement diff handling for different data types using the
-ContentHandler facility.
-$editPage: EditPage object
-&$newtext: wikitext that will be used as "your version"
-
'EditPageGetDiffContent': Allow modifying the wikitext that will be used in
"Show changes". Note that it is preferable to implement diff handling for
different data types using the ContentHandler facility.
$editPage: EditPage object
&$newtext: wikitext that will be used as "your version"
-'EditPageGetPreviewText': DEPRECATED. Use EditPageGetPreviewContent instead.
-Allow modifying the wikitext that will be previewed. Note that it is preferable
-to implement previews for different data types using the ContentHandler
-facility.
+'EditPageGetDiffText': DEPRECATED! Use EditPageGetDiffContent instead.
+Allow modifying the wikitext that will be used in "Show changes". Note that it
+is preferable to implement diff handling for different data types using the
+ContentHandler facility.
$editPage: EditPage object
-&$toparse: wikitext that will be parsed
+&$newtext: wikitext that will be used as "your version"
'EditPageGetPreviewContent': Allow modifying the wikitext that will be
previewed. Note that it is preferable to implement previews for different data
@@ -1256,7 +1247,15 @@ types using the ContentHandler facility.
$editPage: EditPage object
&$content: Content object to be previewed (may be replaced by hook function)
-'EditPageNoSuchSection': When a section edit request is given for an non-existent section
+'EditPageGetPreviewText': DEPRECATED! Use EditPageGetPreviewContent instead.
+Allow modifying the wikitext that will be previewed. Note that it is preferable
+to implement previews for different data types using the ContentHandler
+facility.
+$editPage: EditPage object
+&$toparse: wikitext that will be parsed
+
+'EditPageNoSuchSection': When a section edit request is given for an
+non-existent section
&$editpage: The current EditPage object
&$res: the HTML of the error text
@@ -1267,26 +1266,27 @@ $title: title of page being edited
&$msg: localization message name, overridable. Default is 'editpage-tos-summary'
'EmailConfirmed': When checking that the user's email address is "confirmed".
-$user: User being checked
-$confirmed: Whether or not the email address is confirmed
This runs before the other checks, such as anonymity and the real check; return
true to allow those checks to occur, and false if checking is done.
+$user: User being checked
+$confirmed: Whether or not the email address is confirmed
'EmailUser': Before sending email from one user to another.
-$to: address of receiving user
-$from: address of sending user
+$to: MailAddress object of receiving user
+$from: MailAddress object of sending user
$subject: subject of the mail
$text: text of the mail
+&$error: Out-param for an error
'EmailUserCC': Before sending the copy of the email to the author.
-$to: address of receiving user
-$from: address of sending user
+$to: MailAddress object of receiving user
+$from: MailAddress object of sending user
$subject: subject of the mail
$text: text of the mail
'EmailUserComplete': After sending email from one user to another.
-$to: address of receiving user
-$from: address of sending user
+$to: MailAddress object of receiving user
+$from: MailAddress object of sending user
$subject: subject of the mail
$text: text of the mail
@@ -1302,10 +1302,25 @@ $editToken: The user's edit token.
'EnhancedChangesList::getLogText': to alter, remove or add to the links of a
group of changes in EnhancedChangesList.
+Hook subscribers can return false to omit this line from recentchanges.
$changesList: EnhancedChangesList object
&$links: The links that were generated by EnhancedChangesList
$block: The RecentChanges objects in that block
+'EnhancedChangesListModifyLineData': to alter data used to build
+a grouped recent change inner line in EnhancedChangesList.
+Hook subscribers can return false to omit this line from recentchanges.
+$changesList: EnhancedChangesList object
+&$data: An array with all the components that will be joined in order to create the line
+$block: An array of RecentChange objects in that block
+$rc: The RecentChange object for this line
+
+'EnhancedChangesListModifyBlockLineData': to alter data used to build
+a non-grouped recent change line in EnhancedChangesList.
+$changesList: EnhancedChangesList object
+&$data: An array with all the components that will be joined in order to create the line
+$rc: The RecentChange object for this line
+
'ExemptFromAccountCreationThrottle': Exemption from the account creation
throttle.
$ip: The ip address of the user
@@ -1314,11 +1329,12 @@ $ip: The ip address of the user
change the tables headers.
&$extTypes: associative array of extensions types
-'ExtractThumbParameters': Called when extracting thumbnail parameters from a
-thumbnail file name.
-DEPRECATED: Media handler should override MediaHandler::parseParamString instead.
+'ExtractThumbParameters': DEPRECATED! Media handler should override
+MediaHandler::parseParamString instead.
+Called when extracting thumbnail parameters from a thumbnail file name.
$thumbname: the base name of the thumbnail file
-&$params: the currently extracted params (has source name, temp or archived zone)
+&$params: the currently extracted params (has source name, temp or archived
+zone)
'FetchChangesList': When fetching the ChangesList derivative for a particular
user.
@@ -1341,6 +1357,12 @@ $thumb: the MediaTransformOutput object
$tmpThumbPath: The temporary file system path of the transformed file
$thumbPath: The permanent storage path of the transformed file
+'FileUndeleteComplete': When a file is undeleted
+$title: title object to the file
+$fileVersions: array of undeleted versions. Empty if all versions were restored
+$user: user who performed the undeletion
+$reason: reason
+
'FileUpload': When a file upload occurs.
$file : Image object representing the file that was uploaded
$reupload : Boolean indicating if there was a previously another image there or
@@ -1348,26 +1370,23 @@ $reupload : Boolean indicating if there was a previously another image there or
$hasDescription : Boolean indicating that there was already a description page
and a new one from the comment wasn't created (since 1.17)
-'FileUndeleteComplete': When a file is undeleted
-$title: title object to the file
-$fileVersions: array of undeleted versions. Empty if all versions were restored
-$user: user who performed the undeletion
-$reason: reason
-
'FormatAutocomments': When an autocomment is formatted by the Linker.
- &$comment: Reference to the accumulated comment. Initially null, when set the
- default code will be skipped.
- $pre: Boolean, true if there is text before this autocomment
- $auto: The extracted part of the parsed comment before the call to the hook.
- $post: Boolean, true if there is text after this autocomment
- $title: An optional title object used to links to sections. Can be null.
- $local: Boolean indicating whether section links should refer to local page.
+&$comment: Reference to the accumulated comment. Initially null, when set the
+ default code will be skipped.
+$pre: Boolean, true if there is text before this autocomment
+$auto: The extracted part of the parsed comment before the call to the hook.
+$post: Boolean, true if there is text after this autocomment
+$title: An optional title object used to links to sections. Can be null.
+$local: Boolean indicating whether section links should refer to local page.
+$wikiId: String containing the ID (as used by WikiMap) of the wiki from which the
+ autocomment originated; null for the local wiki. Added in 1.26, should default
+ to null in handler functions, for backwards compatibility.
'GalleryGetModes': Get list of classes that can render different modes of a
- gallery
+gallery.
&$modeArray: An associative array mapping mode names to classes that implement
- that mode. It is expected all registered classes are a subclass of
- ImageGalleryBase.
+ that mode. It is expected all registered classes are a subclass of
+ ImageGalleryBase.
'GetAutoPromoteGroups': When determining which autopromote groups a user is
entitled to be in.
@@ -1392,18 +1411,32 @@ $query: query options passed to Title::getCanonicalURL()
$title: Title object that we need to get a sortkey for
&$sortkey: Sortkey to use.
+'GetDifferenceEngine': Called when getting a new difference engine interface
+object Return false for valid object in $differenceEngine or true for the
+default difference engine.
+$context: IContextSource context to be used for diff
+$old: Revision ID to show and diff with
+$new: Either a revision ID or one of the strings 'cur', 'prev' or 'next'
+$refreshCache: If set, refreshes the diff cache
+$unhide: If set, allow viewing deleted revs
+&$differenceEngine: output parameter, difference engine object to be used for
+ diff
+
'GetDoubleUnderscoreIDs': Modify the list of behavior switch (double
underscore) magic words. Called by MagicWord.
&$doubleUnderscoreIDs: array of strings
'GetExtendedMetadata': Get extended file metadata for the API
-&$combinedMeta: Array of the form: 'MetadataPropName' => array(
-'value' => prop value, 'source' => 'name of hook' ).
+&$combinedMeta: Array of the form:
+ 'MetadataPropName' => array(
+ value' => prop value,
+ 'source' => 'name of hook'
+ ).
$file: File object of file in question
$context: RequestContext (including language to use)
$single: Only extract the current language; if false, the prop value should
-be in the metadata multi-language array format:
-mediawiki.org/wiki/Manual:File_metadata_handling#Multi-language_array_format
+ be in the metadata multi-language array format:
+ mediawiki.org/wiki/Manual:File_metadata_handling#Multi-language_array_format
&$maxCacheTime: how long the results can be cached
'GetFullURL': Modify fully-qualified URLs used in redirects/export/offsite data.
@@ -1411,9 +1444,9 @@ $title: Title object of page
$url: string value as output (out parameter, can modify)
$query: query options passed to Title::getFullURL()
-'GetHumanTimestamp': Pre-emptively override the human-readable timestamp generated
-by MWTimestamp::getHumanTimestamp(). Return false in this hook to use the custom
-output.
+'GetHumanTimestamp': Pre-emptively override the human-readable timestamp
+generated by MWTimestamp::getHumanTimestamp(). Return false in this hook to use
+the custom output.
&$output: string for the output timestamp
$timestamp: MWTimestamp object of the current (user-adjusted) timestamp
$relativeTo: MWTimestamp object of the relative (user-adjusted) timestamp
@@ -1430,7 +1463,7 @@ $query: query options passed to Title::getInternalURL()
'GetLinkColours': modify the CSS class of an array of page links.
$linkcolour_ids: array of prefixed DB keys of the pages linked to,
- indexed by page_id.
+ indexed by page_id.
&$colours: (output) array of CSS classes, indexed by prefixed DB keys
'GetLocalURL': Modify local URLs as output into page links. Note that if you are
@@ -1442,15 +1475,15 @@ $title: Title object of page
&$url: string value as output (out parameter, can modify)
$query: query options passed to Title::getLocalURL()
-'GetLocalURL::Internal': Modify local URLs to internal pages.
+'GetLocalURL::Article': Modify local URLs specifically pointing to article paths
+without any fancy queries or variants.
$title: Title object of page
&$url: string value as output (out parameter, can modify)
-$query: query options passed to Title::getLocalURL()
-'GetLocalURL::Article': Modify local URLs specifically pointing to article paths
-without any fancy queries or variants.
+'GetLocalURL::Internal': Modify local URLs to internal pages.
$title: Title object of page
&$url: string value as output (out parameter, can modify)
+$query: query options passed to Title::getLocalURL()
'GetLogTypesOnUser': Add log types where the target is a userpage
&$types: Array of log types
@@ -1465,9 +1498,10 @@ the media handler metadata output.
'GetNewMessagesAlert': Disable or modify the new messages alert
&$newMessagesAlert: An empty string by default. If the user has new talk page
-messages, this should be populated with an alert message to that effect
-$newtalks: An empty array if the user has no new messages or an array containing
-links and revisions if there are new messages (See User::getNewMessageLinks)
+ messages, this should be populated with an alert message to that effect
+$newtalks: An empty array if the user has no new messages or an array
+ containing links and revisions if there are new messages (See
+ User::getNewMessageLinks)
$user: The user object of the user who is loading the page
$out: OutputPage object (to check what type of page the user is on)
@@ -1476,8 +1510,8 @@ $user: User whose preferences are being modified.
&$preferences: Preferences description array, to be fed to an HTMLForm object
'GetRelativeTimestamp': Pre-emptively override the relative timestamp generated
-by MWTimestamp::getRelativeTimestamp(). Return false in this hook to use the custom
-output.
+by MWTimestamp::getRelativeTimestamp(). Return false in this hook to use the
+custom output.
&$output: string for the output timestamp
&$diff: DateInterval representing the difference between the timestamps
$timestamp: MWTimestamp object of the current (user-adjusted) timestamp
@@ -1493,7 +1527,7 @@ should be plain text with no special coloring, bolding, etc. to show that
they're errors; presenting them properly to the user as errors is done by the
caller.
$title: Title object being checked against
-$user : Current user object
+$user: Current user object
$action: Action being checked
$result: User permissions error to add. If none, return true.
@@ -1504,9 +1538,8 @@ populate $result with the reason in the form of array( messagename, param1,
param2, ... ). For consistency, error messages should be plain text with no
special coloring, bolding, etc. to show that they're errors; presenting them
properly to the user as errors is done by the caller.
-
$title: Title object being checked against
-$user : Current user object
+$user: Current user object
$action: Action being checked
$result: User permissions error to add. If none, return true.
@@ -1521,7 +1554,8 @@ $rev: Revision object
'HTMLFileCache::useFileCache': Override whether a page should be cached in file
cache.
-$context: An IContextSource object with information about the request being served.
+$context: An IContextSource object with information about the request being
+ served.
'ImageBeforeProduceHTML': Called before producing the HTML created by a wiki
image insertion. You can skip the default logic entirely by returning false, or
@@ -1536,7 +1570,6 @@ just modify a few things using call-by-reference.
&$time: Timestamp of file in 'YYYYMMDDHHIISS' string form, or false for current
&$res: Final HTML output, used if you return false
-
'ImageOpenShowImageInlineBefore': Call potential extension just before showing
the image on an image page.
$imagePage: ImagePage object ($this)
@@ -1576,29 +1609,29 @@ using img_auth.php.
header message cannot receive/use parameters.
'ImportHandleLogItemXMLTag': When parsing a XML tag in a log item.
+Return false to stop further processing of the tag
$reader: XMLReader object
$logInfo: Array of information
-Return false to stop further processing of the tag
'ImportHandlePageXMLTag': When parsing a XML tag in a page.
+Return false to stop further processing of the tag
$reader: XMLReader object
$pageInfo: Array of information
-Return false to stop further processing of the tag
'ImportHandleRevisionXMLTag': When parsing a XML tag in a page revision.
+Return false to stop further processing of the tag
$reader: XMLReader object
$pageInfo: Array of page information
$revisionInfo: Array of revision information
-Return false to stop further processing of the tag
'ImportHandleToplevelXMLTag': When parsing a top level XML tag.
-$reader: XMLReader object
Return false to stop further processing of the tag
+$reader: XMLReader object
'ImportHandleUploadXMLTag': When parsing a XML tag in a file upload.
+Return false to stop further processing of the tag
$reader: XMLReader object
$revisionInfo: Array of information
-Return false to stop further processing of the tag
'InfoAction': When building information to display on the action=info page.
$context: IContextSource object
@@ -1611,11 +1644,11 @@ $ignoreRedirect: boolean to skip redirect check
$target: Title/string of redirect target
$article: Article object
-'InterwikiLoadPrefix': When resolving if a given prefix is an interwiki or not.
-Return true without providing an interwiki to continue interwiki search.
-$prefix: interwiki prefix we are looking for.
-&$iwData: output array describing the interwiki with keys iw_url, iw_local,
- iw_trans and optionally iw_api and iw_wikiid.
+'InternalParseBeforeLinks': during Parser's internalParse method before links
+but after nowiki/noinclude/includeonly/onlyinclude and other processings.
+&$parser: Parser object
+&$text: string containing partially parsed text
+&$stripState: Parser's internal StripState object
'InternalParseBeforeSanitize': during Parser's internalParse method just before
the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/
@@ -1625,11 +1658,11 @@ template/parser function execution which respect nowiki and HTML-comments.
&$text: string containing partially parsed text
&$stripState: Parser's internal StripState object
-'InternalParseBeforeLinks': during Parser's internalParse method before links
-but after nowiki/noinclude/includeonly/onlyinclude and other processings.
-&$parser: Parser object
-&$text: string containing partially parsed text
-&$stripState: Parser's internal StripState object
+'InterwikiLoadPrefix': When resolving if a given prefix is an interwiki or not.
+Return true without providing an interwiki to continue interwiki search.
+$prefix: interwiki prefix we are looking for.
+&$iwData: output array describing the interwiki with keys iw_url, iw_local,
+ iw_trans and optionally iw_api and iw_wikiid.
'InvalidateEmailComplete': Called after a user's email has been invalidated
successfully.
@@ -1666,18 +1699,18 @@ $user: User the password is being validated for
$code: The language code or the language we're looking for a messages file for
&$file: The messages file path, you can override this to change the location.
-'LanguageGetNamespaces': Provide custom ordering for namespaces or
-remove namespaces. Do not use this hook to add namespaces. Use
-CanonicalNamespaces for that.
-&$namespaces: Array of namespaces indexed by their numbers
-
-'LanguageGetMagic': DEPRECATED, use $magicWords in a file listed in
+'LanguageGetMagic': DEPRECATED! Use $magicWords in a file listed in
$wgExtensionMessagesFiles instead.
Use this to define synonyms of magic words depending of the language
$magicExtensions: associative array of magic words synonyms
$lang: language code (string)
-'LanguageGetSpecialPageAliases': DEPRECATED, use $specialPageAliases in a file
+'LanguageGetNamespaces': Provide custom ordering for namespaces or
+remove namespaces. Do not use this hook to add namespaces. Use
+CanonicalNamespaces for that.
+&$namespaces: Array of namespaces indexed by their numbers
+
+'LanguageGetSpecialPageAliases': DEPRECATED! Use $specialPageAliases in a file
listed in $wgExtensionMessagesFiles instead.
Use to define aliases of special pages names depending of the language
$specialPageAliases: associative array of magic words synonyms
@@ -1685,7 +1718,7 @@ $lang: language code (string)
'LanguageGetTranslatedLanguageNames': Provide translated language names.
&$names: array of language code => language name
-$code language of the preferred translations
+$code: language of the preferred translations
'LanguageLinks': Manipulate a page's language links. This is called
in various places to allow extensions to define the effective language
@@ -1710,8 +1743,9 @@ $target: the Title that the link is pointing to
&$html: the contents that the <a> tag should have (raw HTML); null means
"default".
&$customAttribs: the HTML attributes that the <a> tag should have, in
-associative array form, with keys and values unescaped. Should be merged with
-default values, with a value of false meaning to suppress the attribute.
+ associative array form, with keys and values unescaped. Should be merged
+ with default values, with a value of false meaning to suppress the
+ attribute.
&$query: the query string to add to the generated URL (the bit after the "?"),
in associative array form, with keys and values unescaped.
&$options: array of options. Can include 'known', 'broken', 'noclasses'.
@@ -1773,7 +1807,7 @@ including delete and insert, has completed for all link tables
&$tags: The list of tags.
'LoadExtensionSchemaUpdates': Called during database installation and updates.
-&updater: A DatabaseUpdater subclass
+&$updater: A DatabaseUpdater subclass
'LocalFile::getHistory': Called before file history query performed.
$file: the File object
@@ -1792,7 +1826,8 @@ cache.
$cache: The LocalisationCache object
$code: language code
&$alldata: The localisation data from core and extensions
-&purgeBlobs: whether to purge/update the message blobs via MessageBlobStore::clear()
+&$purgeBlobs: whether to purge/update the message blobs via
+ MessageBlobStore::clear()
'LocalisationCacheRecacheFallback': Called for each language when merging
fallback data into the cache.
@@ -1808,16 +1843,19 @@ localisation checks.
'LocalisationIgnoredOptionalMessages': When fetching the list of ignored and
optional localisation messages
-&$ignored Array of ignored message keys
-&$optional Array of optional message keys
+&$ignored: Array of ignored message keys
+&$optional: Array of optional message keys
-'LogEventsListGetExtraInputs': When getting extra inputs to display on Special:Log
-for a specific log type
+'LocalUserCreated': Called when a local user has been created
+$user: User object for the created user
+$autocreated: Boolean, whether this was an auto-creation
+
+'LogEventsListGetExtraInputs': When getting extra inputs to display on
+Special:Log for a specific log type
$type: String of log type being displayed
$logEventsList: LogEventsList object for context and access to the WebRequest
&$input: string HTML of an input element
-
'LogEventsListShowLogExtract': Called before the string is added to OutputPage.
Returning false will prevent the string from being added to the OutputPage.
&$s: html string to show for the log extract
@@ -1840,10 +1878,12 @@ $param: Associative Array with the following additional options:
"&lt;div ...>$1&lt;/div>").
- flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
-'LogException': Called before an exception (or PHP error) is logged. This is meant for integration
-with external error aggregation services; returning false will NOT prevent logging.
+'LogException': Called before an exception (or PHP error) is logged. This is
+meant for integration with external error aggregation services; returning false
+will NOT prevent logging.
$e: The exception (in case of a plain old PHP error, a wrapping ErrorException)
-$suppressed: true if the error was suppressed via error_reporting()/wfSuppressWarnings()
+$suppressed: true if the error was suppressed via
+ error_reporting()/wfSuppressWarnings()
'LoginAuthenticateAudit': A login attempt for a valid user account either
succeeded or failed. No return data is accepted; this hook is for auditing only.
@@ -1852,11 +1892,26 @@ $password: the password being submitted and found wanting
$retval: a LoginForm class constant with authenticateUserData() return
value (SUCCESS, WRONG_PASS, etc.).
-'LoginPasswordResetMessage': User is being requested to reset their password on login.
-Use this hook to change the Message that will be output on Special:ChangePassword.
+'LoginFormValidErrorMessages': Called in LoginForm when a function gets valid
+error messages. Allows to add additional error messages (except messages already
+in LoginForm::$validErrorMessages).
+&$messages: Already added messages (inclusive messages from
+ LoginForm::$validErrorMessages)
+
+'LoginPasswordResetMessage': User is being requested to reset their password on
+login. Use this hook to change the Message that will be output on
+Special:ChangePassword.
&$msg: Message object that will be shown to the user
$username: Username of the user who's password was expired.
+'LoginUserMigrated': Called during login to allow extensions the opportunity to
+inform a user that their username doesn't exist for a specific reason, instead
+of letting the login form give the generic error message that the account does
+not exist. For example, when the account has been renamed or deleted.
+$user: the User object being authenticated against.
+&$msg: the message identifier for abort reason, or an array to pass a message
+ key and parameters.
+
'LogLine': Processes a single log entry on Special:Log.
$log_type: string for the type of log entry (e.g. 'move'). Corresponds to
logging.log_type database field.
@@ -1877,13 +1932,13 @@ Special:LonelyPages.
&$conds: conditions for the query
&$joinConds: join conditions for the query
+'MagicWordwgVariableIDs': When defining new magic words IDs.
+$variableIDs: array of strings
+
'MaintenanceRefreshLinksInit': before executing the refreshLinks.php maintenance
script.
$refreshLinks: RefreshLinks object
-'MagicWordwgVariableIDs': When defining new magic words IDs.
-$variableIDs: array of strings
-
'MakeGlobalVariablesScript': Called at end of OutputPage::getJSVars.
Ideally, this hook should only be used to add variables that depend on
the current page/request; static configuration should be added through
@@ -1914,10 +1969,6 @@ $user: $wgUser
$request: $wgRequest
$mediaWiki: The $mediawiki object
-'MessagesPreLoad': When loading a message from the database.
-$title: title of the message (string)
-$message: value (string), change it to the message you want to define
-
'MessageCache::get': When fetching a message. Can be used to override the key
for customisations. Given and returned message key must be in special format:
1) first letter must be in lower case according to the content language.
@@ -1929,15 +1980,17 @@ caches.
$title: name of the page changed.
$text: new contents of the page.
-'MimeMagicInit': Before processing the list mapping MIME types to media types
-and the list mapping MIME types to file extensions.
-As an extension author, you are encouraged to submit patches to MediaWiki's
-core to add new MIME types to mime.types.
+'MessagesPreLoad': When loading a message from the database.
+$title: title of the message (string)
+$message: value (string), change it to the message you want to define
+
+'MimeMagicGuessFromContent': Allows MW extensions guess the MIME by content.
$mimeMagic: Instance of MimeMagic.
- Use $mimeMagic->addExtraInfo( $stringOfInfo );
- for adding new MIME info to the list.
- Use $mimeMagic->addExtraTypes( $stringOfTypes );
- for adding new MIME types to the list.
+&$head: First 1024 bytes of the file in a string (in - Do not alter!).
+&$tail: More or equal than last 65558 bytes of the file in a string
+ (in - Do not alter!).
+$file: File path.
+&$mime: MIME type (out).
'MimeMagicImproveFromExtension': Allows MW extensions to further improve the
MIME type detected by considering the file extension.
@@ -1945,13 +1998,15 @@ $mimeMagic: Instance of MimeMagic.
$ext: File extension.
&$mime: MIME type (in/out).
-'MimeMagicGuessFromContent': Allows MW extensions guess the MIME by content.
+'MimeMagicInit': Before processing the list mapping MIME types to media types
+and the list mapping MIME types to file extensions.
+As an extension author, you are encouraged to submit patches to MediaWiki's
+core to add new MIME types to mime.types.
$mimeMagic: Instance of MimeMagic.
-&$head: First 1024 bytes of the file in a string (in - Do not alter!).
-&$tail: More or equal than last 65558 bytes of the file in a string
- (in - Do not alter!).
-$file: File path.
-&$mime: MIME type (out).
+ Use $mimeMagic->addExtraInfo( $stringOfInfo );
+ for adding new MIME info to the list.
+ Use $mimeMagic->addExtraTypes( $stringOfTypes );
+ for adding new MIME types to the list.
'ModifyExportQuery': Modify the query used by the exporter.
$db: The database object to be queried.
@@ -1960,27 +2015,20 @@ $db: The database object to be queried.
&$opts: Options for the query.
&$join_conds: Join conditions for the query.
-'MovePageCheckPermissions': Specify whether the user is allowed to move the page.
+'MovePageCheckPermissions': Specify whether the user is allowed to move the
+page.
$oldTitle: Title object of the current (old) location
$newTitle: Title object of the new location
$user: User making the move
$reason: string of the reason provided by the user
$status: Status object to pass error messages to
-'MovePageIsValidMove': Specify whether a page can be moved for technical reasons.
+'MovePageIsValidMove': Specify whether a page can be moved for technical
+reasons.
$oldTitle: Title object of the current (old) location
$newTitle: Title object of the new location
$status: Status object to pass error messages to
-'BaseTemplateToolbox': Called by BaseTemplate when building the $toolbox array
-and returning it for the skin to output. You can add items to the toolbox while
-still letting the skin make final decisions on skin-specific markup conventions
-using this hook.
-&$sk: The BaseTemplate base skin template
-&$toolbox: An array of toolbox items, see BaseTemplate::getToolbox and
- BaseTemplate::makeListItem for details on the format of individual items
- inside of this array.
-
'NamespaceIsMovable': Called when determining if it is possible to pages in a
namespace.
$index: Integer; the index of the namespace being checked.
@@ -1988,6 +2036,13 @@ $result: Boolean; whether MediaWiki currently thinks that pages in this
namespace are movable. Hooks may change this value to override the return
value of MWNamespace::isMovable().
+'NewDifferenceEngine': Called when a new DifferenceEngine object is made
+$title: the diff page title (nullable)
+&$oldId: the actual old Id to use in the diff
+&$newId: the actual new Id to use in the diff (0 means current)
+$old: the ?old= param value from the url
+$new: the ?new= param value from the url
+
'NewRevisionFromEditComplete': Called when a revision was inserted due to an
edit.
$wikiPage: the WikiPage edited
@@ -2049,11 +2104,7 @@ $sk: The Skin that called OutputPage::headElement
'OutputPageCheckLastModified': when checking if the page has been modified
since the last visit.
&$modifiedTimes: array of timestamps.
- The following keys are set: page, user, epoch
-
-'OutputPageParserOutput': after adding a parserOutput to $wgOut
-$out: OutputPage instance (object)
-$parserOutput: parserOutput instance being added in $out
+ The following keys are set: page, user, epoch
'OutputPageMakeCategoryLinks': Links are about to be generated for the page's
categories. Implementations should return false if they generate the category
@@ -2064,6 +2115,10 @@ $categories: associative array, keys are category names, values are category
$links: array, intended to hold the result. Must be an associative array with
category types as keys and arrays of HTML links as values.
+'OutputPageParserOutput': after adding a parserOutput to $wgOut
+$out: OutputPage instance (object)
+$parserOutput: parserOutput instance being added in $out
+
'PageContentInsertComplete': After a new article is created.
$wikiPage: WikiPage created
$user: User creating the article
@@ -2099,7 +2154,8 @@ $isMinor: Whether or not the edit was marked as minor
$isWatch: (No longer used)
$section: (No longer used)
$flags: Flags passed to WikiPage::doEditContent()
-$revision: New Revision of the article (can be null for edits that change nothing)
+$revision: New Revision of the article (can be null for edits that change
+ nothing)
$status: Status object about to be returned by doEditContent()
$baseRevId: the rev ID (or false) this edit was based on
@@ -2112,6 +2168,13 @@ $row: the revision row for this line
$s: the string representing this parsed line
$classes: array containing the <li> element classes
+'PageHistoryPager::doBatchLookups': Called after the pager query was run, before
+any output is generated, to allow batch lookups for prefetching information
+needed for display. If the hook handler returns false, the regular behavior of
+doBatchLookups() is skipped.
+$pager: the PageHistoryPager
+$result: a ResultWrapper representing the query result
+
'PageHistoryPager::getQueryInfo': when a history pager query parameter set is
constructed.
$pager: the pager
@@ -2123,7 +2186,7 @@ the key.
&$confstr: reference to a hash key string which can be modified
$user: User (object) requesting the page
-'PageViewUpdate': Allow database (or other) changes to be made after a
+'PageViewUpdates': Allow database (or other) changes to be made after a
page view is seen by MediaWiki. Note this does not capture views made
via external caches such as Squid.
$wikipage: WikiPage (object) for the page being viewed.
@@ -2145,6 +2208,11 @@ $stripState: stripState used (object)
$parser: Parser object being used
$text: text that will be returned
+'ParserAfterUnstrip': Called after the first unstripGeneral() in
+Parser::internalParseHalfParsed()
+$parser: Parser object being used
+$text: text that will be returned
+
'ParserBeforeInternalParse': Called at the beginning of Parser::internalParse().
$parser: Parser object
$text: text to parse
@@ -2160,6 +2228,14 @@ $stripState: stripState used (object)
$parser: Parser object being used
$text: actual text
+'ParserCacheSaveComplete': Called after a ParserOutput has been committed to
+the parser cache.
+$parserCache: ParserCache object $parserOutput was stored in
+$parserOutput: ParserOutput object that was stored
+$title: Title of the page that was parsed to generate $parserOutput
+$popts: ParserOptions used for generating $parserOutput
+$revId: ID of the revision that was parsed to create $parserOutput
+
'ParserClearState': Called at the end of Parser::clearState().
$parser: Parser object being cleared
@@ -2173,7 +2249,7 @@ $parser: Newly-cloned Parser object
custom magic word
$parser: Parser object
$varCache: array to store the value in case of multiples calls of the
- same magic word
+ same magic word
$index: index (string) of the magic
$ret: value of the magic word (the hook should set it)
$frame: PPFrame object to use for expanding any template variables
@@ -2188,7 +2264,7 @@ cache or return false to not use it.
$parser: Parser object
$varCache: variable cache (array)
-'ParserLimitReport': DEPRECATED, use ParserLimitReportPrepare and
+'ParserLimitReport': DEPRECATED! Use ParserLimitReportPrepare and
ParserLimitReportFormat instead.
Called at the end of Parser:parse() when the parser will
include comments about size of the text parsed.
@@ -2203,11 +2279,11 @@ $key: Key for the limit report item (string)
&$value: Value of the limit report item
&$report: String onto which to append the data
$isHTML: If true, $report is an HTML table with two columns; if false, it's
- text intended for display in a monospaced font.
+ text intended for display in a monospaced font.
$localize: If false, $report should be output in English.
-'ParserLimitReportPrepare': Called at the end of Parser:parse() when the parser will
-include comments about size of the text parsed. Hooks should use
+'ParserLimitReportPrepare': Called at the end of Parser:parse() when the parser
+will include comments about size of the text parsed. Hooks should use
$output->setLimitReportData() to populate data. Functions for this hook should
not use $wgLang; do that in ParserLimitReportFormat instead.
$parser: Parser object
@@ -2230,39 +2306,51 @@ $section: the section number, zero-based, but section 0 is usually empty
&$sectionContent: ref to the content of the section. modify this.
$showEditLinks: boolean describing whether this section has an edit link
-'ParserTestParser': Called when creating a new instance of Parser in
-tests/parser/parserTest.inc.
-$parser: Parser object created
-
'ParserTestGlobals': Allows to define globals for parser tests.
&$globals: Array with all the globals which should be set for parser tests.
The arrays keys serve as the globals names, its values are the globals values.
+'ParserTestParser': Called when creating a new instance of Parser in
+tests/parser/parserTest.inc.
+$parser: Parser object created
+
'ParserTestTables': Alter the list of tables to duplicate when parser tests are
run. Use when page save hooks require the presence of custom tables to ensure
that tests continue to run properly.
&$tables: array of table names
+'PasswordPoliciesForUser': Alter the effective password policy for a user.
+$user: User object whose policy you are modifying
+&$effectivePolicy: Array of policy statements that apply to this user
+$purpose: string indicating purpose of the check, one of 'login', 'create',
+ or 'reset'
+
+'PerformRetroactiveAutoblock': Called before a retroactive autoblock is applied
+to a user.
+$block: Block object (which is set to be autoblocking)
+&$blockIds: Array of block IDs of the autoblock
+
'PersonalUrls': Alter the user-specific navigation links (e.g. "my page,
my talk page, my contributions" etc).
&$personal_urls: Array of link specifiers (see SkinTemplate.php)
&$title: Title object representing the current page
-$skin: SkinTemplate object providing context (e.g. to check if the user is logged in, etc.)
+$skin: SkinTemplate object providing context (e.g. to check if the user is
+ logged in, etc.)
'PingLimiter': Allows extensions to override the results of User::pingLimiter().
-&$user : User performing the action
-$action : Action being performed
-&$result : Whether or not the action should be prevented
-Change $result and return false to give a definitive answer, otherwise
-the built-in rate limiting checks are used, if enabled.
+&$user: User performing the action
+$action: Action being performed
+&$result: Whether or not the action should be prevented
+ Change $result and return false to give a definitive answer, otherwise
+ the built-in rate limiting checks are used, if enabled.
$incrBy: Amount to increment counter by
'PlaceNewSection': Override placement of new sections. Return false and put the
merged text into $text to override the default behavior.
-$wikipage : WikiPage object
-$oldtext : the text of the article before editing
-$subject : subject of the new section
-&$text : text of the new section
+$wikipage: WikiPage object
+$oldtext: the text of the article before editing
+$subject: subject of the new section
+&$text: text of the new section
'PostLoginRedirect': Modify the post login redirect behavior.
Occurs after signing up or logging in, allows for interception of redirect.
@@ -2274,32 +2362,33 @@ Occurs after signing up or logging in, allows for interception of redirect.
success: display a return to link using $wgRedirectOnLogin if needed
successredirect: send an HTTP redirect using $wgRedirectOnLogin if needed
+'PreferencesFormPreSave': Override preferences being saved
+$formData: array of user submitted data
+$form: PreferencesForm object, also a ContextSource
+$user: User object with preferences to be saved set
+&$result: boolean indicating success
+
'PreferencesGetLegend': Override the text used for the <legend> of a
preferences section.
$form: the PreferencesForm object. This is a ContextSource as well
$key: the section name
-&$legend: the legend text. Defaults to wfMessage( "prefs-$key" )->text() but may be overridden
-
-'PreferencesFormPreSave': Override preferences being saved
- $formData: array of user submitted data
- $form: PreferencesForm object, also a ContextSource
- $user: User object with preferences to be saved set
- &$result: boolean indicating success
+&$legend: the legend text. Defaults to wfMessage( "prefs-$key" )->text() but may
+ be overridden
'PrefixSearchBackend': Override the title prefix search used for OpenSearch and
AJAX search suggestions. Put results into &$results outparam and return false.
-$ns : array of int namespace keys to search in
-$search : search term (not guaranteed to be conveniently normalized)
-$limit : maximum number of results to return
-&$results : out param: array of page names (strings)
-$offset : number of results to offset from the beginning
+$ns: array of int namespace keys to search in
+$search: search term (not guaranteed to be conveniently normalized)
+$limit: maximum number of results to return
+&$results: out param: array of page names (strings)
+$offset: number of results to offset from the beginning
'PrefixSearchExtractNamespace': Called if core was not able to extract a
namespace from the search string so that extensions can attempt it.
-$namespaces : array of int namespace keys to search in (change this if you can
-extract namespaces)
-$search : search term (replace this with term without the namespace if you can
-extract one)
+$namespaces: array of int namespace keys to search in (change this if you can
+ extract namespaces)
+$search: search term (replace this with term without the namespace if you can
+ extract one)
'PrefsEmailAudit': Called when user changes their email address.
$user: User (object) changing his email address
@@ -2327,6 +2416,12 @@ shown.
$article: the page the form is shown for
$out: OutputPage object
+'RandomPageQuery': Lets you modify the query used by Special:Random to select
+random pages.
+&$tables: Database tables to be used in the query
+&$conds: Conditions to be applied in the query
+&$joinConds: Join conditions to be applied in the query
+
'RawPageViewBeforeOutput': Right before the text is blown out in action=raw.
&$obj: RawAction object
&$text: The text that's going to be the output
@@ -2339,10 +2434,18 @@ names such as "oldid" that are preserved when using redirecting special pages
such as Special:MyPage and Special:MyTalk.
&$redirectParams: An array of parameters preserved by redirecting special pages.
+'RejectParserCacheValue': Return false to reject an otherwise usable
+cached value from the Parser cache. NOTE: CARELESS USE OF THIS HOOK CAN
+HAVE CATASTROPHIC CONSEQUENCES FOR HIGH-TRAFFIC INSTALLATIONS. USE WITH
+EXTREME CARE.
+$parserOutput: ParserOutput value.
+$wikiPage: WikiPage object.
+$parserOptions: ParserOptions object.
+
'RequestContextCreateSkin': Called when RequestContext::getSkin creates a skin
instance. Can be used by an extension override what skin is used in certain
contexts.
-IContextSource $context: The RequestContext the skin is being created for.
+$context: (IContextSource) The RequestContext the skin is being created for.
&$skin: A variable reference you may set a Skin instance or string key on to
override the skin that will be used for the context.
@@ -2350,9 +2453,12 @@ IContextSource $context: The RequestContext the skin is being created for.
$user: The user having their password expiration reset
&$newExpire: The new expiration date
-'ResetSessionID': Called from wfResetSessionID
-$oldSessionID: old session id
-$newSessionID: new session id
+'ResourceLoaderForeignApiModules': Called from ResourceLoaderForeignApiModule.
+Use this to add dependencies to 'mediawiki.ForeignApi' module when you wish
+to override its behavior. See the module docs for more information.
+&$dependencies: string[] List of modules that 'mediawiki.ForeignApi' should
+depend on
+$context: ResourceLoaderContext|null
'ResourceLoaderGetConfigVars': Called at the end of
ResourceLoaderStartUpModule::getConfigSettings(). Use this to export static
@@ -2360,8 +2466,9 @@ configuration variables to JavaScript. Things that depend on the current page
or request state must be added through MakeGlobalVariablesScript instead.
&$vars: array( variable name => value )
-'ResourceLoaderGetLessVars': Called in ResourceLoader::getLessVars after variables
-from $wgResourceLoaderLESSVars are added. Can be used to add context-based variables.
+'ResourceLoaderGetLessVars': Called in ResourceLoader::getLessVars after
+variables from $wgResourceLoaderLESSVars are added. Can be used to add
+context-based variables.
&$lessVars: array of variables already added
'ResourceLoaderRegisterModules': Right before modules information is required,
@@ -2371,17 +2478,16 @@ loader request or generating HTML output.
'ResourceLoaderTestModules': Let you add new JavaScript testing modules. This is
called after the addition of 'qunit' and MediaWiki testing resources.
-&testModules: array of JavaScript testing modules. The 'qunit' framework,
+&$testModules: array of JavaScript testing modules. The 'qunit' framework,
included in core, is fed using tests/qunit/QUnitTestResources.php.
-&ResourceLoader object
-
-To add a new qunit module named 'myext.tests':
-testModules['qunit']['myext.tests'] = array(
- 'script' => 'extension/myext/tests.js',
- 'dependencies' => <any module dependency you might have>
-);
-For QUnit framework, the mediawiki.tests.qunit.testrunner dependency will be
-added to any module.
+ To add a new qunit module named 'myext.tests':
+ $testModules['qunit']['myext.tests'] = array(
+ 'script' => 'extension/myext/tests.js',
+ 'dependencies' => <any module dependency you might have>
+ );
+ For QUnit framework, the mediawiki.tests.qunit.testrunner dependency will be
+ added to any module.
+&$ResourceLoader: object
'RevisionInsertComplete': Called after a revision is inserted into the database.
&$revision: the Revision
@@ -2392,35 +2498,35 @@ $data: the data stored in old_text. The meaning depends on $flags: if external
$flags: a comma-delimited list of strings representing the options used. May
include: utf8 (this will always be set for new revisions); gzip; external.
-'SearchGetNearMatchBefore': Perform exact-title-matches in "go" searches before
-the normal operations.
-$allSearchTerms : Array of the search terms in all content languages
-&$titleResult : Outparam; the value to return. A Title object or null.
+'SearchableNamespaces': An option to modify which namespaces are searchable.
+&$arr: Array of namespaces ($nsId => $name) which will be used.
'SearchAfterNoDirectMatch': If there was no match for the exact result. This
runs before lettercase variants are attempted, whereas 'SearchGetNearMatch'
runs after.
-$term : Search term string
-&$title : Outparam; set to $title object and return false for a match
+$term: Search term string
+&$title: Outparam; set to $title object and return false for a match
'SearchGetNearMatch': An extra chance for exact-title-matches in "go" searches
if nothing was found.
-$term : Search term string
-&$title : Outparam; set to $title object and return false for a match
+$term: Search term string
+&$title: Outparam; set to $title object and return false for a match
+
+'SearchGetNearMatchBefore': Perform exact-title-matches in "go" searches before
+the normal operations.
+$allSearchTerms: Array of the search terms in all content languages
+&$titleResult: Outparam; the value to return. A Title object or null.
'SearchGetNearMatchComplete': A chance to modify exact-title-matches in "go"
searches.
-$term : Search term string
-&$title : Current Title object that is being returned (null if none found).
+$term: Search term string
+&$title: Current Title object that is being returned (null if none found).
'SearchResultInitFromTitle': Set the revision used when displaying a page in
search results.
-$title : Current Title object being displayed in search results.
+$title: Current Title object being displayed in search results.
&$id: Revision ID (default is false, for latest)
-'SearchableNamespaces': An option to modify which namespaces are searchable.
-&$arr : Array of namespaces ($nsId => $name) which will be used.
-
'SecondaryDataUpdates': Allows modification of the list of DataUpdates to
perform when page content is modified. Currently called by
AbstractContent::getSecondaryDataUpdates.
@@ -2441,24 +2547,23 @@ $nt: the Title object
&$prefix: optional text to display after $html
&$ret: the value to return if your hook returns false
+'SendWatchlistEmailNotification': Return true to send watchlist email
+notification
+$targetUser: the user whom to send watchlist email notification
+$title: the page title
+$enotif: EmailNotification object
+
'SetupAfterCache': Called in Setup.php, after cache objects are set
'ShowMissingArticle': Called when generating the output for a non-existent page.
$article: The article object corresponding to the page
-'ShowRawCssJs': Customise the output of raw CSS and JavaScript in page views.
-DEPRECATED, use the ContentGetParserOutput hook instead!
+'ShowRawCssJs': DEPRECATED! Use the ContentGetParserOutput hook instead.
+Customise the output of raw CSS and JavaScript in page views.
$text: Text being shown
$title: Title of the custom script/stylesheet page
$output: Current OutputPage object
-'ShowSearchHitTitle': Customise display of search hit title/link.
-&$title: Title to link to
-&$text: Text to use for the link
-$result: The search result
-$terms: The search terms entered
-$page: The SpecialSearch object.
-
'ShowSearchHit': Customize display of search hit.
$searchPage: The SpecialSearch instance.
$result: The SearchResult to show
@@ -2475,17 +2580,31 @@ $terms: Search terms, for highlighting
hit. Must include the <li> ... </li> tags. Will only be used if the hook
function returned false.
-'SiteNoticeBefore': Before the sitenotice/anonnotice is composed. Return true to
-allow the normal method of notice selection/rendering to work, or change the
-value of $siteNotice and return false to alter it.
-&$siteNotice: HTML returned as the sitenotice
+'ShowSearchHitTitle': Customise display of search hit title/link.
+&$title: Title to link to
+&$text: Text to use for the link
+$result: The search result
+$terms: The search terms entered
+$page: The SpecialSearch object.
+
+'SidebarBeforeOutput': Allows to edit sidebar just before it is output by skins.
+Warning: This hook is run on each display. You should consider to use
+'SkinBuildSidebar' that is aggressively cached.
$skin: Skin object
+&$bar: Sidebar content
+ Modify $bar to add or modify sidebar portlets.
'SiteNoticeAfter': After the sitenotice/anonnotice is composed.
&$siteNotice: HTML sitenotice. Alter the contents of $siteNotice to add to/alter
the sitenotice/anonnotice.
$skin: Skin object
+'SiteNoticeBefore': Before the sitenotice/anonnotice is composed. Return true to
+allow the normal method of notice selection/rendering to work, or change the
+value of $siteNotice and return false to alter it.
+&$siteNotice: HTML returned as the sitenotice
+$skin: Skin object
+
'SkinAfterBottomScripts': At the end of Skin::bottomScripts().
$skin: Skin object
&$text: bottomScripts Text. Append to $text to add additional text/scripts after
@@ -2502,12 +2621,6 @@ $skin: Skin object
&$bar: Sidebar contents
Modify $bar to add or modify sidebar portlets.
-'SidebarBeforeOutput': Allows to edit sidebar just before its output by skins.
-$skin Skin object
-&$bar: Sidebar content
-Modify $bar to add or modify sidebar portlets.
-Warning: This hook is run on each display. You should consider to use 'SkinBuildSidebar' that is aggressively cached.
-
'SkinCopyrightFooter': Allow for site and per-namespace customization of
copyright notice.
$title: displayed page title
@@ -2515,8 +2628,8 @@ $type: 'normal' or 'history' for old/diff views
&$msg: overridable message; usually 'copyright' or 'history_copyright'. This
message must be in HTML format, not wikitext!
&$link: overridable HTML link to be passed into the message as $1
-&$forContent: overridable flag if copyright footer is shown in content language.
- This parameter is deprecated.
+&$forContent: DEPRECATED! overridable flag if copyright footer is shown in
+ content language.
'SkinEditSectionLinks': Modify the section edit links
$skin: Skin object rendering the UI
@@ -2526,18 +2639,18 @@ $section: The designation of the section being pointed to, to be included in
the link, like "&section=$section"
$tooltip: The default tooltip. Escape before using.
By default, this is wrapped in the 'editsectionhint' message.
-&$result: Array containing all link detail arrays. Each link detail array should contain
- the following keys:
- * targetTitle - Target Title object
- * text - String for the text
- * attribs - Array of attributes
- * query - Array of query parameters to add to the URL
- * options - Array of options for Linker::link
+&$result: Array containing all link detail arrays. Each link detail array should
+ contain the following keys:
+ - targetTitle - Target Title object
+ - text - String for the text
+ - attribs - Array of attributes
+ - query - Array of query parameters to add to the URL
+ - options - Array of options for Linker::link
$lang: The language code to use for the link in the wfMessage function
'SkinGetPoweredBy': TODO
&$text: additional 'powered by' icons in HTML. Note: Modern skin does not use
-the MediaWiki icon but plain text instead.
+ the MediaWiki icon but plain text instead.
$skin: Skin object
'SkinPreloadExistence': Supply titles that should be added to link existence
@@ -2546,13 +2659,13 @@ cache before the page is rendered.
$skin: Skin object
'SkinSubPageSubtitle': At the beginning of Skin::subPageSubtitle().
-&$subpages: Subpage links HTML
-$skin: Skin object
-$out: OutputPage object
If false is returned $subpages will be used instead of the HTML
subPageSubtitle() generates.
If true is returned, $subpages will be ignored and the rest of
subPageSubtitle() will run.
+&$subpages: Subpage links HTML
+$skin: Skin object
+$out: OutputPage object
'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink': After creating the "permanent
link" tab.
@@ -2567,13 +2680,18 @@ $languageLinkTitle: Title object belonging to the external language link.
$title: Title object of the page the link belongs to.
$outputPage: The OutputPage object the links are built from.
-To alter the structured navigation links in SkinTemplates, there are three
-hooks called in different spots:
-
'SkinTemplateNavigation': Called on content pages after the tabs have been
added, but before variants have been added.
+&$sktemplate: SkinTemplate object
+&$links: Structured navigation links. This is used to alter the navigation for
+ skins which use buildNavigationUrls such as Vector.
+
'SkinTemplateNavigation::SpecialPage': Called on special pages after the special
tab is added but before variants have been added.
+&$sktemplate: SkinTemplate object
+&$links: Structured navigation links. This is used to alter the navigation for
+ skins which use buildNavigationUrls such as Vector.
+
'SkinTemplateNavigation::Universal': Called on both content and special pages
after variants have been added.
&$sktemplate: SkinTemplate object
@@ -2615,10 +2733,6 @@ software.
$software: The array of software in format 'name' => 'version'. See
SpecialVersion::softwareInformation().
-'SpecialPageBeforeFormDisplay': Before executing the HTMLForm object.
-$name: name of the special page
-&$form: HTMLForm object
-
'SpecialBlockModifyFormFields': Add more fields to Special:Block
$sp: SpecialPage object, for context
&$fields: Current HTMLForm fields
@@ -2668,7 +2782,7 @@ Special:NewPages.
&$special: NewPagesPager object (subclass of ReverseChronologicalPager)
$opts: FormOptions object containing special page options
&$conds: array of WHERE conditionals for query
-&tables: array of tables to be queried
+&$tables: array of tables to be queried
&$fields: array of columns to select
&$join_conds: join conditions for the tables
@@ -2678,8 +2792,8 @@ $special: the special page object
name/URL parameters. Each key maps to an associative array with a 'msg'
(message key) and a 'default' value.
-'SpecialPage_initList': Called when setting up SpecialPageFactory::$list, use this
-hook to remove a core special page or conditionally register special pages.
+'SpecialPage_initList': Called when setting up SpecialPageFactory::$list, use
+this hook to remove a core special page or conditionally register special pages.
$list: list (array) of core special pages
'SpecialPageAfterExecute': Called after SpecialPage::execute.
@@ -2690,6 +2804,10 @@ $subPage: the subpage string or null if no subpage was specified
$special: the SpecialPage object
$subPage: the subpage string or null if no subpage was specified
+'SpecialPageBeforeFormDisplay': Before executing the HTMLForm object.
+$name: name of the special page
+&$form: HTMLForm object
+
'SpecialPasswordResetOnSubmit': When executing a form submission on
Special:PasswordReset.
$users: array of User objects.
@@ -2707,8 +2825,9 @@ use this to change some selection criteria or substitute a different title.
&$title: If the hook returns false, a Title object to use instead of the
result from the normal query
-'SpecialRecentChangesFilters': Called after building form options at
-RecentChanges. Deprecated, use ChangesListSpecialPageFilters instead.
+'SpecialRecentChangesFilters': DEPRECATED! Use ChangesListSpecialPageFilters
+instead.
+Called after building form options at RecentChanges.
$special: the special page object
&$filters: associative array of filter definitions. The keys are the HTML
name/URL parameters. Each key maps to an associative array with a 'msg'
@@ -2719,9 +2838,10 @@ SpecialRecentChanges.
&$extraOpts: array of added items, to which can be added
$opts: FormOptions for this request
-'SpecialRecentChangesQuery': Called when building SQL query for
-SpecialRecentChanges and SpecialRecentChangesLinked. Deprecated, use
-ChangesListSpecialPageQuery instead.
+'SpecialRecentChangesQuery': DEPRECATED! Use ChangesListSpecialPageQuery
+instead.
+Called when building SQL query for SpecialRecentChanges and
+SpecialRecentChangesLinked.
&$conds: array of WHERE conditionals for query
&$tables: array of tables to be queried
&$join_conds: join conditions for the tables
@@ -2732,7 +2852,10 @@ $opts: FormOptions for this request
'SpecialResetTokensTokens': Called when building token list for
SpecialResetTokens.
&$tokens: array of token information arrays in the format of
- array( 'preference' => '<preference-name>', 'label-message' => '<message-key>' )
+ array(
+ 'preference' => '<preference-name>',
+ 'label-message' => '<message-key>',
+ )
'SpecialSearchCreateLink': Called when making the message to create a page or
go to the existing page.
@@ -2749,9 +2872,6 @@ the advanced form, a.k.a. power search box.
$term: the search term (not a title object)
$opts: an array of hidden options (containing 'redirs' and 'profile')
-'SpecialSearchProfiles': Allows modification of search profiles.
-&$profiles: profiles, which can be modified.
-
'SpecialSearchProfileForm': Allows modification of search profile forms.
$search: special page object
&$form: String: form html
@@ -2759,10 +2879,13 @@ $profile: String: current search profile
$term: String: search term
$opts: Array: key => value of hidden options for inclusion in custom forms
-'SpecialSearchSetupEngine': Allows passing custom data to search engine.
-$search: SpecialSearch special page object
-$profile: String: current search profile
-$engine: the search engine
+'SpecialSearchProfiles': Allows modification of search profiles.
+&$profiles: profiles, which can be modified.
+
+'SpecialSearchResults': Called before search result display
+$term: string of search term
+&$titleMatches: empty or SearchResultSet object
+&$textMatches: empty or SearchResultSet object
'SpecialSearchResultsPrepend': Called immediately before returning HTML
on the search results page. Useful for including an external search
@@ -2772,19 +2895,24 @@ $specialSearch: SpecialSearch object ($this)
$output: $wgOut
$term: Search term specified by the user
-'SpecialSearchResults': Called before search result display
-$term: string of search term
-&$titleMatches: empty or SearchResultSet object
-&$textMatches: empty or SearchResultSet object
+'SpecialSearchResultsAppend': Called immediately before returning HTML
+on the search results page. Useful for including a feedback link.
+$specialSearch: SpecialSearch object ($this)
+$output: $wgOut
+
+'SpecialSearchSetupEngine': Allows passing custom data to search engine.
+$search: SpecialSearch special page object
+$profile: String: current search profile
+$engine: the search engine
'SpecialStatsAddExtra': Add extra statistic at the end of Special:Statistics.
&$extraStats: Array to save the new stats
- ( $extraStats['<name of statistic>'] => <value>;
- <value> can be an array with the keys "name" and "number":
- "name" is the HTML to be displayed in the name column
- "number" is the number to be displayed.
- or, <value> can be the number to be displayed and <name> is the
- message key to use in the name column,
+ $extraStats['<name of statistic>'] => <value>;
+ <value> can be an array with the keys "name" and "number":
+ "name" is the HTML to be displayed in the name column
+ "number" is the number to be displayed.
+ or, <value> can be the number to be displayed and <name> is the
+ message key to use in the name column,
$context: IContextSource object
'SpecialUploadComplete': Called after successfully uploading a file from
@@ -2795,26 +2923,27 @@ $form: The SpecialUpload object
$wgVersion: Current $wgVersion for you to use
&$versionUrl: Raw url to link to (eg: release notes)
-'SpecialWatchlistFilters': Called after building form options at Watchlist.
-Deprecated, use ChangesListSpecialPageFilters instead.
+'SpecialWatchlistFilters': DEPRECATED! Use ChangesListSpecialPageFilters
+instead.
+Called after building form options at Watchlist.
$special: the special page object
&$filters: associative array of filter definitions. The keys are the HTML
name/URL parameters. Each key maps to an associative array with a 'msg'
(message key) and a 'default' value.
-'SpecialWatchlistQuery': Called when building sql query for SpecialWatchlist.
-Deprecated, use ChangesListSpecialPageQuery instead.
+'SpecialWatchlistGetNonRevisionTypes': Called when building sql query for
+SpecialWatchlist. Allows extensions to register custom values they have
+inserted to rc_type so they can be returned as part of the watchlist.
+&$nonRevisionTypes: array of values in the rc_type field of recentchanges table
+
+'SpecialWatchlistQuery': DEPRECATED! Use ChangesListSpecialPageQuery instead.
+Called when building sql query for SpecialWatchlist.
&$conds: array of WHERE conditionals for query
&$tables: array of tables to be queried
&$join_conds: join conditions for the tables
&$fields: array of query fields
$opts: A FormOptions object with watchlist options for the current request
-'SpecialWatchlistGetNonRevisionTypes': Called when building sql query for
-SpecialWatchlist. Allows extensions to register custom values they have
-inserted to rc_type so they can be returned as part of the watchlist.
-&$nonRevisionTypes: array of values in the rc_type field of recentchanges table
-
'TestCanonicalRedirect': Called when about to force a redirect to a canonical
URL for a title when we have no other parameters on the URL. Gives a chance for
extensions that alter page view behavior radically to abort that redirect or
@@ -2838,32 +2967,17 @@ $res: database result used to create the object
$title: The title being tested.
&$exists: Whether the title exists.
-'TitleQuickPermissions': Called from Title::checkQuickPermissions to add to
-or override the quick permissions check.
-$title: The Title object being accessed
-$user: The User performing the action
-$action: Action being performed
-&$errors: Array of errors
-$doExpensiveQueries: Whether to do expensive DB queries
-$short: Whether to return immediately on first error
-
'TitleGetEditNotices': Allows extensions to add edit notices
$title: The Title object for the page the edit notices are for
$oldid: Revision ID that the edit notices are for (or 0 for latest)
-&$notices: Array of notices. Keys are i18n message keys, values are parseAsBlock()ed messages.
+&$notices: Array of notices. Keys are i18n message keys, values are
+parseAsBlock()ed messages.
'TitleGetRestrictionTypes': Allows extensions to modify the types of protection
that can be applied.
$title: The title in question.
&$types: The types of protection available.
-'TitleIsCssOrJsPage': DEPRECATED! Use ContentHandlerDefaultModelFor instead.
-Called when determining if a page is a CSS or JS page.
-$title: Title object that is being checked
-$result: Boolean; whether MediaWiki currently thinks this is a CSS/JS page.
- Hooks may change this value to override the return value of
- Title::isCssOrJsPage().
-
'TitleIsAlwaysKnown': Called when determining if a page exists. Allows
overriding default behavior for determining if a page exists. If $isKnown is
kept as null, regular checks happen. If it's a boolean, this value is returned
@@ -2871,6 +2985,13 @@ by the isKnown method.
$title: Title object that is being checked
&$isKnown: Boolean|null; whether MediaWiki currently thinks this page is known
+'TitleIsCssOrJsPage': DEPRECATED! Use ContentHandlerDefaultModelFor instead.
+Called when determining if a page is a CSS or JS page.
+$title: Title object that is being checked
+$result: Boolean; whether MediaWiki currently thinks this is a CSS/JS page.
+ Hooks may change this value to override the return value of
+ Title::isCssOrJsPage().
+
'TitleIsMovable': Called when determining if it is possible to move a page. Note
that this hook is not called for interwiki pages or pages in immovable
namespaces: for these, isMovable() always returns false.
@@ -2900,6 +3021,15 @@ $pageid: database ID of the page that's been moved
$redirid: database ID of the created redirect
$reason: reason for the move
+'TitleQuickPermissions': Called from Title::checkQuickPermissions to add to
+or override the quick permissions check.
+$title: The Title object being accessed
+$user: The User performing the action
+$action: Action being performed
+&$errors: Array of errors
+$doExpensiveQueries: Whether to do expensive DB queries
+$short: Whether to return immediately on first error
+
'TitleReadWhitelist': Called at the end of read permissions checks, just before
adding the default error message if nothing allows the user to read the page. If
a handler wants a title to *not* be whitelisted, it should also return false.
@@ -2932,16 +3062,16 @@ $title: Title object of the page that we're about to undelete
$title: title object related to the revision
$rev: revision (object) that will be viewed
-'UnknownAction': An unknown "action" has occurred (useful for defining your own
-actions).
-$action: action name
-$article: article "acted on"
-
'UnitTestsList': Called when building a list of paths containing PHPUnit tests.
Since 1.24: Paths pointing to a directory will be recursively scanned for
test case files matching the suffix "Test.php".
&$paths: list of test cases and directories to search.
+'UnknownAction': An unknown "action" has occurred (useful for defining your own
+actions).
+$action: action name
+$article: article "acted on"
+
'UnwatchArticle': Before a watch is removed from an article.
$user: user watching
$page: WikiPage object to be removed
@@ -2954,10 +3084,13 @@ $page: WikiPage object that was watched
'UpdateUserMailerFormattedPageStatus': Before notification email gets sent.
$formattedPageStatus: list of valid page states
-'UploadForm:initial': Before the upload form is generated. You might set the
-member-variables $uploadFormTextTop and $uploadFormTextAfterSummary to inject
-text (HTML) either before or after the editform.
-$form: UploadForm object
+'UploadComplete': Upon completion of a file upload.
+$uploadBase: UploadBase (or subclass) object. File can be accessed by
+ $uploadBase->getLocalFile().
+
+'UploadCreateFromRequest': When UploadBase::createFromRequest has been called.
+$type: (string) the requested upload type
+&$className: the class name of the Upload instance to be created
'UploadForm:BeforeProcessing': At the beginning of processUpload(). Lets you
poke at member variables like $mUploadDescription before the file is saved. Do
@@ -2966,12 +3099,10 @@ blank form with no error message; use UploadVerification and UploadVerifyFile
instead.
$form: UploadForm object
-'UploadCreateFromRequest': When UploadBase::createFromRequest has been called.
-$type: (string) the requested upload type
-&$className: the class name of the Upload instance to be created
-
-'UploadComplete': when Upload completes an upload.
-&$upload: an UploadBase child instance
+'UploadForm:initial': Before the upload form is generated. You might set the
+member-variables $uploadFormTextTop and $uploadFormTextAfterSummary to inject
+text (HTML) either before or after the editform.
+$form: UploadForm object
'UploadFormInitDescriptor': After the descriptor for the upload form as been
assembled.
@@ -2983,25 +3114,21 @@ $descriptor: (array) the HTMLForm descriptor
'UploadVerification': Additional chances to reject an uploaded file. Consider
using UploadVerifyFile instead.
-string $saveName: destination file name
-string $tempName: filesystem path to the temporary file for checks
-string &$error: output: message key for message to show if upload canceled by
+$saveName: (string) destination file name
+$tempName: (string) filesystem path to the temporary file for checks
+&$error: (string) output: message key for message to show if upload canceled by
returning false. May also be an array, where the first element is the message
key and the remaining elements are used as parameters to the message.
'UploadVerifyFile': extra file verification, based on MIME type, etc. Preferred
in most cases over UploadVerification.
-object $upload: an instance of UploadBase, with all info about the upload
-string $mime: The uploaded file's MIME type, as detected by MediaWiki. Handlers
- will typically only apply for specific MIME types.
-object &$error: output: true if the file is valid. Otherwise, an indexed array
+$upload: (object) an instance of UploadBase, with all info about the upload
+$mime: (string) The uploaded file's MIME type, as detected by MediaWiki.
+ Handlers will typically only apply for specific MIME types.
+&$error: (object) output: true if the file is valid. Otherwise, an indexed array
representing the problem with the file, where the first element is the message
key and the remaining elements are used as parameters to the message.
-'UploadComplete': Upon completion of a file upload.
-$uploadBase: UploadBase (or subclass) object. File can be accessed by
- $uploadBase->getLocalFile().
-
'User::mailPasswordInternal': before creation and mailing of a user's new
temporary password
$user: the user who sent the message out
@@ -3021,7 +3148,7 @@ $res: database result used to create the object
'userCan': To interrupt/advise the "user can do X to Y article" check. If you
want to display an error message, try getUserPermissionsErrors.
$title: Title object being checked against
-$user : Current user object
+$user: Current user object
$action: Action being checked
$result: Pointer to result returned if hook returns false. If null is returned,
userCan checks are continued by internal code.
@@ -3062,7 +3189,8 @@ $user: User object
&$timestamp: timestamp, change this to override local email authentication
timestamp
-'UserGetImplicitGroups': DEPRECATED, called in User::getImplicitGroups().
+'UserGetImplicitGroups': DEPRECATED!
+Called in User::getImplicitGroups().
&$groups: List of implicit (automatically-assigned) groups
'UserGetLanguageObject': Called when getting user's interface language object.
@@ -3077,6 +3205,12 @@ $context: IContextSource object
$user: User to get rights for
&$rights: Current rights
+'UserGroupsChanged': Called after user groups are changed.
+$user: User whose groups changed
+$added: Groups added
+$removed: Groups removed
+$performer: User who performed the change, false if via autopromotion
+
'UserIsBlockedFrom': Check if a user is blocked from a specific page (for
specific block exemptions).
$user: User in question
@@ -3094,6 +3228,14 @@ $ip: User's IP address
false if a UserGetRights hook might remove the named right.
$right: The user right being checked
+'UserIsHidden': Check if the user's name should be hidden. See User::isHidden().
+$user: User in question.
+&$hidden: Set true if the user's name should be hidden.
+
+'UserIsLocked': Check if the user is locked. See User::isLocked().
+$user: User in question.
+&$locked: Set true if the user should be locked.
+
'UserLoadAfterLoadFromSession': Called to authenticate users on external or
environmental means; occurs after session is loaded.
$user: user object being loaded
@@ -3117,6 +3259,9 @@ database.
$user: User object
&$options: Options, can be modified.
+'UserLoggedIn': Called after a user is logged in
+$user: User object for the logged-in user
+
'UserLoginComplete': After a user has logged in.
$user: the user object that was created on login
$inject_html: Any HTML to inject after the "logged in" message.
@@ -3132,16 +3277,16 @@ $user: the user object _after_ logout (won't have name, ID, etc.)
$inject_html: Any HTML to inject after the "logged out" message.
$oldName: name of the user before logout (string)
+'UserMailerChangeReturnPath': Called to generate a VERP return address
+when UserMailer sends an email, with a bounce handling extension.
+$to: Array of MailAddress objects for the recipients
+&$returnPath: The return address string
+
'UserRemoveGroup': Called when removing a group; return false to override stock
group removal.
$user: the user object that is to have a group removed
&$group: the group to be removed, can be modified
-'UserRights': After a user's group memberships are changed.
-$user : User object that was changed
-$add : Array of strings corresponding to groups added
-$remove: Array of strings corresponding to groups removed
-
'UserRequiresHTTPS': Called to determine whether a user needs
to be switched to HTTPS.
$user: User in question.
@@ -3162,13 +3307,19 @@ message(s).
$user: user retrieving new talks messages
$talks: array of new talks page(s)
-'UserSaveSettings': Called when saving user settings.
-$user: User object
+'UserRights': DEPRECATED! Use UserGroupsChanged instead.
+After a user's group memberships are changed.
+&$user: User object that was changed
+$add: Array of strings corresponding to groups added
+$remove: Array of strings corresponding to groups removed
'UserSaveOptions': Called just before saving user preferences/options.
$user: User object
&$options: Options, modifiable
+'UserSaveSettings': Called when saving user settings.
+$user: User object
+
'UserSetCookies': Called when setting user cookies.
$user: User object
&$session: session array, will be added to $_SESSION
@@ -3196,16 +3347,6 @@ invalidated and GetExtendedMetadata hook called again).
$timestamp: The timestamp metadata was generated
$file: The file the metadata is for
-'UserMailerChangeReturnPath': Called to generate a VERP return address
-when UserMailer sends an email, with a bounce handling extension.
-$to: Array of MailAddress objects for the recipients
-&$returnPath: The return address string
-
-'LoginFormValidErrorMessages': Called in LoginForm when a function gets valid error
-messages. Allows to add additional error messages (except messages already in
-LoginForm::$validErrorMessages).
-&$messages Already added messages (inclusive messages from LoginForm::$validErrorMessages)
-
'WantedPages::getQueryInfo': Called in WantedPagesPage::getQueryInfo(), can be
used to alter the SQL query which gets the list of wanted pages.
&$wantedPages: WantedPagesPage object
@@ -3244,6 +3385,17 @@ Return false to prevent setting of the cookie.
&$expire: Cookie expiration, as for PHP's setcookie()
$options: Options passed to WebResponse::setcookie()
+'wfShellWikiCmd': Called when generating a shell-escaped command line string to
+run a MediaWiki cli script.
+&$script: MediaWiki cli script path
+&$parameters: Array of arguments and options to the script
+&$options: Associative array of options, may contain the 'php' and 'wrapper'
+ keys
+
+'wgQueryPages': Called when initialising list of QueryPage subclasses, use this
+to add new query pages to be updated with maintenance/updateSpecialPages.php.
+$qp: The list of QueryPages
+
'WhatLinksHereProps': Allows annotations to be added to WhatLinksHere
$row: The DB row of the entry.
$title: The Title of the page where the link comes FROM
@@ -3264,17 +3416,6 @@ $page: the WikiPage
$content: the Content to generate updates for
&$updates: the array of DataUpdate objects. Hook function may want to add to it.
-'wfShellWikiCmd': Called when generating a shell-escaped command line string to
-run a MediaWiki cli script.
-&$script: MediaWiki cli script path
-&$parameters: Array of arguments and options to the script
-&$options: Associative array of options, may contain the 'php' and 'wrapper'
- keys
-
-'wgQueryPages': Called when initialising list of QueryPage subclasses, use this
-to add new query pages to be updated with maintenance/updateSpecialPages.php.
-$qp: The list of QueryPages
-
'XmlDumpWriterOpenPage': Called at the end of XmlDumpWriter::openPage, to allow
extra metadata to be added.
$obj: The XmlDumpWriter object.
@@ -3289,16 +3430,5 @@ $obj: The XmlDumpWriter object.
$row: The database row for the revision.
$text: The revision text.
-'XMPGetInfo': Called when obtaining the list of XMP tags to extract. Can be used
-to add additional tags to extract.
-&$items: Array containing information on which items to extract. See XMPInfo for
- details on the format.
-
-'XMPGetResults': Called just before returning the results array of parsing xmp
-data. Can be used to post-process the results.
-&$data: Array of metadata sections (such as $data['xmp-general']) each section
- is an array of metadata tags returned (each tag is either a value, or an array
- of values).
-
More hooks might be available but undocumented, you can execute
"php maintenance/findHooks.php" to find hidden ones.
diff --git a/docs/kss/styleguide-template/index.html b/docs/kss/styleguide-template/index.html
index 933260ec..d1ae26af 100644
--- a/docs/kss/styleguide-template/index.html
+++ b/docs/kss/styleguide-template/index.html
@@ -55,10 +55,11 @@
{{else}}
{{#whenDepth 2}}
<a name="section-{{ reference }}"></a>
- <h2>{{ reference }} {{ header }}</h2>
+ <h2><a href="#section-{{ reference }}">{{ reference }} {{ header }}</a></h2>
{{/whenDepth}}
{{#whenDepth 3}}
- <h3>{{ reference }} {{ header }}</h3>
+ <a name="section-{{ reference }}"></a>
+ <h3><a href="#section-{{ reference }}">{{ reference }} {{ header }}</a></h3>
{{/whenDepth}}
{{/whenDepth}}
{{#ifAny markup modifiers}}
diff --git a/docs/kss/styleguide-template/public/kss.less b/docs/kss/styleguide-template/public/kss.less
index eeea1a87..3727694d 100644
--- a/docs/kss/styleguide-template/public/kss.less
+++ b/docs/kss/styleguide-template/public/kss.less
@@ -106,6 +106,11 @@ nav {
h1, h2, h3, h4, h5, h6, p {
margin-left: 20px;
+
+ a {
+ text-decoration: none;
+ color: #000;
+ }
}
p {
diff --git a/docs/linkcache.txt b/docs/linkcache.txt
index 266f200d..13b69613 100644
--- a/docs/linkcache.txt
+++ b/docs/linkcache.txt
@@ -21,4 +21,4 @@ foreach( $pages as $page ){
}
$batch = new LinkBatch( $titles );
-$batch->execute(); \ No newline at end of file
+$batch->execute();
diff --git a/docs/memcached.txt b/docs/memcached.txt
index d18b199e..ad2307fd 100644
--- a/docs/memcached.txt
+++ b/docs/memcached.txt
@@ -152,7 +152,6 @@ Newtalk:
Parser Cache:
stored in: $parserMemc
- controlled by: $wgEnableParserCache
key: $wgDBname:pcache:idhash:$pageid-$renderkey!$hash
$pageid: id of the page
$renderkey: 1 if action=render, 0 otherwise
diff --git a/docs/scripts.txt b/docs/scripts.txt
index 178bb157..53dff36e 100644
--- a/docs/scripts.txt
+++ b/docs/scripts.txt
@@ -49,7 +49,4 @@ Primary scripts:
There is also a file with a .php5 extension for each script. They can be used if
the web server needs a .php5 to run the file with the PHP 5 engine and runs .php
-scripts with PHP 4. To use these files, you have to modify $wgScriptExtension to
-'.php5' is LocalSettings.php but it is already done by the config script if you
-used mw-config/index.php5 for installation.
-
+scripts with PHP 4. You should not use them anymore.
diff --git a/docs/sitelist.txt b/docs/sitelist.txt
index 48c7ce52..24e1b9a7 100644
--- a/docs/sitelist.txt
+++ b/docs/sitelist.txt
@@ -44,4 +44,4 @@ The XML elements are used as follows:
** link: Generic URL template, often the document root.
** page_path: (for mediawiki sites) URL template for wiki pages (corresponds to the target wiki's $wgArticlePath setting)
** file_path: (for mediawiki sites) URL pattern for application entry points and resources (corresponds to the target wiki's $wgScriptPath setting).
-* forward: Whether using a prefix defined by a localid tag in the URL will cause the request to be redirected to the corresponding page on the target wiki (currently unused). E.g. whether http://wiki.acme.com/wiki/foo:Buzz should be forwarded to http://wiki.foo.com/read/Buzz. (CAVEAT: not yet implement, can be specified but has no effect) \ No newline at end of file
+* forward: Whether using a prefix defined by a localid tag in the URL will cause the request to be redirected to the corresponding page on the target wiki (currently unused). E.g. whether http://wiki.acme.com/wiki/foo:Buzz should be forwarded to http://wiki.foo.com/read/Buzz. (CAVEAT: not yet implement, can be specified but has no effect)
diff --git a/docs/uidesign/design.html b/docs/uidesign/design.html
index 51c1b552..6ab57d7d 100644
--- a/docs/uidesign/design.html
+++ b/docs/uidesign/design.html
@@ -2,6 +2,7 @@
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="../../resources/src/mediawiki.legacy/shared.css">
+ <link rel="stylesheet" href="../../resources/src/mediawiki/mediawiki.feedlink.css">
</head>
<body style="font-size: small;">