Merge "RCFilters: Standardize loading indicator appearance"
[lhc/web/wiklou.git] / docs / hooks.txt
index fcd3e07..40777da 100644 (file)
@@ -232,7 +232,7 @@ wfRunHooks must be used, which was deprecated in MediaWiki 1.25.
 Note that hook parameters are passed in an array; this is a necessary
 inconvenience to make it possible to pass reference values (that can be changed)
 into the hook code. Also note that earlier versions of wfRunHooks took a
-variable number of arguments; the [] calling protocol came about after
+variable number of arguments; the array calling protocol came about after
 MediaWiki 1.4rc1.
 
 ==Events and parameters==
@@ -739,6 +739,11 @@ $user: the user who did the rollback
 $revision: the revision the page was reverted back to
 $current: the reverted revision
 
+'ArticleShowPatrolFooter': Called at the beginning of Article#showPatrolFooter.
+Extensions can use this to not show the [mark as patrolled] link in certain
+circumstances.
+$article: the Article object
+
 '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
@@ -1835,6 +1840,9 @@ just modify a few things using call-by-reference.
   includes/Linker.php for Linker::makeImageLink
 &$time: Timestamp of file in 'YYYYMMDDHHIISS' string form, or false for current
 &$res: Final HTML output, used if you return false
+$parser: Parser instance
+&$query: Query params for desc URL
+&$widthOption: Used by the parser to remember the user preference thumbnailsize
 
 'ImageOpenShowImageInlineBefore': Call potential extension just before showing
 the image on an image page.
@@ -2179,7 +2187,8 @@ $autocreated: Boolean, whether this was an auto-creation
 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
+&$input: string HTML of an input element (deprecated, use $formDescriptor instead)
+&$formDescriptor: array HTMLForm's form descriptor
 
 'LogEventsListShowLogExtract': Called before the string is added to OutputPage.
 Returning false will prevent the string from being added to the OutputPage.
@@ -2391,7 +2400,9 @@ $row: the database row for this page (the recentchanges record and a few extras
 edit.
 $wikiPage: the WikiPage edited
 $rev: the new revision
-$baseID: the revision ID this was based off, if any
+$originalRevId: if the edit restores or repeats an earlier revision (such as a
+  rollback or a null revision), the ID of that earlier revision. False otherwise.
+  (Used to be called $baseID.)
 $user: the editing user
 &$tags: tags to apply to the edit and recent change
 
@@ -2429,6 +2440,12 @@ users and/or IP addresses too.
 &$otherBlockLink: An array with links to other block logs
 $ip: The requested IP address or username
 
+'OutputPageAfterGetHeadLinksArray': Called in OutputPage#getHeadLinksArray right
+before returning the result.
+&$tags: array containing all <head> links generated so far. The array format is
+"link name or number => 'link HTML'".
+$out: the OutputPage object
+
 'OutputPageBeforeHTML': A page has been processed by the parser and the
 resulting HTML is about to be displayed.
 &$parserOutput: the parserOutput (object) that corresponds to the page
@@ -2499,7 +2516,9 @@ $flags: Flags passed to WikiPage::doEditContent()
 $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
+$originalRevId: if the edit restores or repeats an earlier revision (such as a
+  rollback or a null revision), the ID of that earlier revision. False otherwise.
+  (Used to be called $baseRevId.)
 $undidRevId: the rev ID (or 0) this edit undid
 
 'PageHistoryBeforeList': When a history page list is about to be constructed.
@@ -3332,7 +3351,7 @@ called.
 the advanced form, a.k.a. power search box.
 &$showSections: an array to add values with more options to
 $term: the search term (not a title object)
-$opts: an array of hidden options (containing 'redirs' and 'profile')
+&$opts: an array of hidden options (containing 'redirs' and 'profile')
 
 'SpecialSearchProfileForm': Allows modification of search profile forms.
 $search: special page object
@@ -3589,11 +3608,11 @@ $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
-not use this hook to break upload processing. This will return the user to a
-blank form with no error message; use UploadVerification and UploadVerifyFile
-instead.
-&$form: UploadForm object
+poke at member variables like $mUploadDescription before the file is saved.
+Do not use this hook to break upload processing.
+This will return the user to a blank form with no error message;
+use UploadVerifyUpload or UploadVerifyFile instead.
+&$upload: SpecialUpload object
 
 'UploadForm:getInitialPageText': After the initial page text for file uploads
 is generated, to allow it to be altered.
@@ -3604,7 +3623,7 @@ $config: Config object
 '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
+&$upload: SpecialUpload object
 
 'UploadFormInitDescriptor': After the descriptor for the upload form as been
 assembled.