Merge "Add more $wgPoolCounterConf comments"
[lhc/web/wiklou.git] / docs / hooks.txt
index 1ecc1f8..c5b112d 100644 (file)
@@ -592,6 +592,10 @@ 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.
 
+'ApiValidatePassword': Called from ApiValidatePassword.
+$module: ApiValidatePassword instance.
+&$r: Result array.
+
 '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.
@@ -599,12 +603,6 @@ a chance to hide their (unrelated) log entries.
   AND in the final query)
 $logTypes: Array of log types being queried
 
-'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
-
 'ArticleAfterFetchContentObject': After fetching content of an article from the
 database.
 &$article: the article (object) being loaded from the database
@@ -673,18 +671,6 @@ Wiki::articleFromTitle().
 &$article: Article (object) that will be returned
 $context: IContextSource (object)
 
-'ArticleInsertComplete': DEPRECATED! Use PageContentInsertComplete.
-After a new article is created.
-$wikiPage: WikiPage created
-$user: User creating the article
-$text: New content
-$summary: Edit summary/comment
-$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
-
 'ArticleMergeComplete': After merging to article using Special:Mergehistory.
 $targetTitle: target title (object)
 $destTitle: destination title (object)
@@ -736,30 +722,6 @@ $user: the user who did the rollback
 $revision: the revision the page was reverted back to
 $current: the reverted revision
 
-'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
-$summary: the article summary (comment)
-$isminor: minor flag
-$iswatch: watch flag
-$section: section #
-
-'ArticleSaveComplete': DEPRECATED! Use PageContentSaveComplete instead.
-After an article has been updated.
-$wikiPage: WikiPage modified
-$user: User performing the modification
-$text: New content
-$summary: Edit summary/comment
-$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
-$status: Status object about to be returned by doEditContent()
-$baseRevId: the rev ID (or false) this edit was based on
-
 'ArticleUndelete': When one or more revisions of an article are restored.
 &$title: Title corresponding to the article restored
 $create: Whether or not the restoration caused the page to be created (i.e. it
@@ -1074,6 +1036,12 @@ $params: tag params
 $rc: RecentChange being tagged when the tagging accompanies the action or null
 $user: User who performed the tagging when the tagging is subsequent to the action or null
 
+'ChangeUserGroups': Called before user groups are changed.
+$performer: The User who will perform the change
+$user: The User whose groups will be changed
+&$add: The groups that will be added
+&$remove: The groups that will be removed
+
 '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
@@ -1323,12 +1291,6 @@ $section: Section being edited
 &$error: Error message to return
 $summary: Edit summary for page
 
-'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
@@ -1437,13 +1399,6 @@ types using the ContentHandler facility.
 $editPage: EditPage object
 &$content: Content object to be previewed (may be replaced by hook function)
 
-'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
@@ -2220,6 +2175,7 @@ $text: new contents of the page.
 '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
+$code: code (string) denoting the language to try.
 
 'MimeMagicGuessFromContent': Allows MW extensions guess the MIME by content.
 $mimeMagic: Instance of MimeMagic.
@@ -2385,6 +2341,7 @@ $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
+$undidRevId: the rev ID (or 0) this edit undid
 
 'PageHistoryBeforeList': When a history page list is about to be constructed.
 &$article: the article that the history is loading for
@@ -3302,13 +3259,6 @@ 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.
@@ -3317,13 +3267,6 @@ $title: Title object that is being checked
   Hooks may change this value to override the return value of
   Title::isMovable().
 
-'TitleIsWikitextPage': DEPRECATED! Use ContentHandlerDefaultModelFor instead.
-Called when determining if a page is a wikitext or should
-be handled by separate handler (via ArticleViewCustom).
-$title: Title object that is being checked
-&$result: Boolean; whether MediaWiki currently thinks this is a wikitext page.
-  Hooks may change this value to override the return value of
-  Title::isWikitextPage()
 
 'TitleMove': Before moving an article (title).
 $old: old title
@@ -3373,6 +3316,15 @@ $user: Current user object
 $title: Title object to purge
 &$urls: An array of URLs to purge from the caches, to be manipulated.
 
+'UnblockUser': Before an IP address or user is unblocked.
+&$block: The Block object about to be saved
+&$user: The user performing the unblock (not the one being unblocked)
+&$reason: If the hook is aborted, the error message to be returned in an array
+
+'UnblockUserComplete': After an IP address or user has been unblocked.
+$block: The Block object that was saved
+$user: The user who performed the unblock (not the one being unblocked)
+
 'UndeleteForm::showHistory': Called in UndeleteForm::showHistory, after a
 PageArchive object has been created but before any further processing is done.
 &$archive: PageArchive object
@@ -3399,8 +3351,9 @@ 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).
+'UnknownAction': DEPRECATED! To add an action in an extension,
+create a subclass of Action, and add a new key to $wgActions.
+An unknown "action" has occurred (useful for defining your own actions).
 $action: action name
 $article: article "acted on"