Merge "mediawiki.user: Simplify mw.user.generateRandomSessionId"
[lhc/web/wiklou.git] / docs / hooks.txt
index ea662cc..a73d50f 100644 (file)
@@ -1200,7 +1200,6 @@ wrapped in a span element which has class="patrollink".
 $differenceEngine: DifferenceEngine object
 &$markAsPatrolledLink: The "mark as patrolled" link HTML (string)
 $rcid: Recent change ID (rc_id) for this change (int)
-$token: Patrol token; $rcid is used in generating this variable
 
 'DifferenceEngineMarkPatrolledRCID': Allows extensions to possibly change the rcid parameter.
 For example the rcid might be set to zero due to the user being the same as the
@@ -1926,8 +1925,8 @@ $code: language of the preferred translations
 in various places to allow extensions to define the effective language
 links for a page.
 $title: The page's Title.
-&$links: Associative array mapping language codes to prefixed links of the
-  form "language:title".
+&$links: Array with elements of the form "language:title" in the order
+  that they will be output.
 &$linkFlags: Associative array mapping prefixed links to arrays of flags.
   Currently unused, but planned to provide support for marking individual
   language links in the UI, e.g. for featured articles.
@@ -2465,6 +2464,13 @@ $revId: ID of the revision that was parsed to create $parserOutput
 'ParserCloned': Called when the parser is cloned.
 $parser: Newly-cloned Parser object
 
+'ParserFetchTemplate': Called when the parser fetches a template
+$parser: Parser Parser object or false
+$title: Title object of the template to be fetched
+$rev: Revision object of the template
+&$text: Transclusion text of the template or false or null
+&$deps: Array of template dependencies with 'title', 'page_id', 'rev_id' keys
+
 'ParserFirstCallInit': Called when the parser initialises for the first time.
 &$parser: Parser object being cleared
 
@@ -2487,12 +2493,24 @@ cache or return false to not use it.
 &$parser: Parser object
 &$varCache: variable cache (array)
 
-'ParserLimitReport': DEPRECATED! Use ParserLimitReportPrepare instead.
+'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.
 $parser: Parser object
 &$limitReport: text that will be included (without comment tags)
 
+'ParserLimitReportFormat': Called for each row in the parser limit report that
+needs formatting. If nothing handles this hook, the default is to use "$key" to
+get the label, and "$key-value" or "$key-value-text"/"$key-value-html" to
+format the value.
+$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.
+$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
 $output->setLimitReportData() to populate data. Functions for this hook should
@@ -2521,10 +2539,6 @@ $showEditLinks: boolean describing whether this section has an edit link
 &$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.
@@ -3210,6 +3224,15 @@ $engine: the search engine
   message key to use in the name column,
 $context: IContextSource object
 
+'SpecialTrackingCategories::preprocess': Called after LinkBatch on Special:TrackingCategories
+$specialPage: The SpecialTrackingCategories object
+$trackingCategories: Array of data from Special:TrackingCategories with msg and cats
+
+'SpecialTrackingCategories::generateCatLink': Called for each cat link on Special:TrackingCategories
+$specialPage: The SpecialTrackingCategories object
+$catTitle: The Title object of the linked category
+&$html: The Result html
+
 'SpecialUploadComplete': Called after successfully uploading a file from
 Special:Upload.
 &$form: The SpecialUpload object
@@ -3361,7 +3384,7 @@ PageArchive object has been created but before any further processing is done.
 &$archive: PageArchive object
 $title: Title object of the page that we're viewing
 
-'UndeleteForm::undelete': Called un UndeleteForm::undelete, after checking that
+'UndeleteForm::undelete': Called in UndeleteForm::undelete, after checking that
 the site is not in read-only mode, that the Title object is not null and after
 a PageArchive object has been constructed but before performing any further
 processing.