Add Timing interface
[lhc/web/wiklou.git] / docs / hooks.txt
index eb77a19..427f35e 100644 (file)
@@ -575,6 +575,7 @@ $error: if the deletion was prohibited, the (raw HTML) error message to display
   (added in 1.13)
 $status: Status object, modify this to throw an error. Overridden by $error
   (added in 1.20)
+$suppress: Whether this is a suppression deletion or not (added in 1.27)
 
 'ArticleDeleteAfterSuccess': Output after an article has been deleted.
 $title: Title of the article that has been deleted.
@@ -641,16 +642,14 @@ $popts: parser options to be used for pre-save transformation
 'ArticleProtect': Before an article is protected.
 $wikiPage: the WikiPage being protected
 $user: the user doing the protection
-$protect: boolean whether this is a protect or an unprotect
+$protect: Set of restriction keys
 $reason: Reason for protect
-$moveonly: boolean whether this is for move only or not
 
 'ArticleProtectComplete': After an article is protected.
 $wikiPage: the WikiPage that was protected
 $user: the user who did the protection
-$protect: boolean whether it was a protect or an unprotect
+$protect: Set of restriction keys
 $reason: Reason for protect
-$moveonly: boolean whether it was for move only or not
 
 'ArticlePurge': Before executing "&action=purge".
 $wikiPage: WikiPage (object) to purge
@@ -769,7 +768,7 @@ $name: Image name being checked
 
 'BaseTemplateAfterPortlet': After output of portlets, allow injecting
 custom HTML after the section. Any uses of the hook need to handle escaping.
-$template BaseTemplate
+$template: BaseTemplate
 $portlet: string portlet name
 &$html: string
 
@@ -1364,10 +1363,10 @@ $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
+$file: Image object representing the file that was uploaded
+$reupload: Boolean indicating if there was a previously another image there or
   not (since 1.17)
-$hasDescription : Boolean indicating that there was already a description page
+$hasDescription: Boolean indicating that there was already a description page
   and a new one from the comment wasn't created (since 1.17)
 
 'FormatAutocomments': When an autocomment is formatted by the Linker.
@@ -1958,12 +1957,14 @@ $rcid: ID of the revision to be marked patrolled
 $user: the user (object) marking the revision as patrolled
 $wcOnlySysopsCanPatrol: config setting indicating whether the user needs to be a
   sysop in order to mark an edit patrolled.
+$auto true if the edit is being marked as patrolled automatically
 
 'MarkPatrolledComplete': After an edit is marked patrolled.
 $rcid: ID of the revision marked as patrolled
 $user: user (object) who marked the edit patrolled
 $wcOnlySysopsCanPatrol: config setting indicating whether the user must be a
   sysop to patrol the edit.
+$auto true if the edit is being marked as patrolled automatically
 
 'MediaWikiPerformAction': Override MediaWiki::performAction(). Use this to do
 something completely different, after the basic globals have been set up, but
@@ -2677,8 +2678,10 @@ $out: OutputPage object
 
 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink': After creating the "permanent
 link" tab.
-$sktemplate: SkinTemplate object
-$nav_urls: array of tabs
+&$sktemplate: SkinTemplate object
+&$nav_urls: array of tabs
+&$revid: The revision id of the permanent link
+&$revid2: The revision id of the permanent link, second time
 
 'SkinTemplateGetLanguageLink': After building the data for a language link from
 which the actual html is constructed.
@@ -2907,6 +2910,7 @@ $term: Search term specified by the user
 on the search results page.  Useful for including a feedback link.
 $specialSearch: SpecialSearch object ($this)
 $output: $wgOut
+$term: Search term specified by the user
 
 'SpecialSearchSetupEngine': Allows passing custom data to search engine.
 $search: SpecialSearch special page object
@@ -3292,6 +3296,26 @@ when UserMailer sends an email, with a bounce handling extension.
 $to: Array of MailAddress objects for the recipients
 &$returnPath: The return address string
 
+'UserMailerSplitTo': Called in UserMailer::send() to give extensions a chance
+to split up an email with multiple the To: field into separate emails.
+$to: array of MailAddress objects; unset the ones which should be mailed separately
+
+'UserMailerTransformContent': Called in UserMailer::send() to change email contents.
+Extensions can block sending the email by returning false and setting $error.
+$to: array of MailAdresses of the targets
+$from: MailAddress of the sender
+&$body: email body, either a string (for plaintext emails) or an array with 'text' and 'html' keys
+&$error: should be set to an error message string
+
+'UserMailerTransformMessage': Called in UserMailer::send() to change email after it has gone through
+the MIME transform. Extensions can block sending the email by returning false and setting $error.
+$to: array of MailAdresses of the targets
+$from: MailAddress of the sender
+&$subject: email subject (not MIME encoded)
+&$headers: email headers (except To: and Subject:) as an array of header name => value pairs
+&$body: email body (in MIME format) as a string
+&$error: should be set to an error message 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