r89969 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89968‎ | r89969 | r89970 >
Date:14:55, 13 June 2011
Author:ialex
Status:ok
Tags:
Comment:
Added: ActionBeforeFormDisplay, ActionModifyFormFields, ExtensionTypes, MaintenanceRefreshLinksInit and SpecialPasswordResetOnSubmit
Removed: AfterUserMessage, FormatUserMessage, MathAfterTexvc, SetupUserMessageArticle and UserLoginMailPassword
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -264,6 +264,17 @@
265265 $user: the User object about to be created (read-only, incomplete)
266266 &$msg: out parameter: name of error message to display on abort
267267
 268+'ActionBeforeFormDisplay': before executing the HTMLForm object
 269+$name: name of the action
 270+&$form: HTMLForm object
 271+$article: Article object
 272+
 273+'ActionModifyFormFields': before creating an HTMLForm object for a page action;
 274+ allows to change the fields on the form that will be generated
 275+$name: name of the action
 276+&$fields: HTMLForm descriptor array
 277+$article: Article object
 278+
268279 'AddNewAccount': after a user account is created
269280 $user: the User object that was created. (Parameter added in 1.7)
270281 $byEmail: true when account was created "by email" (added in 1.12)
@@ -275,16 +286,6 @@
276287 $sRevCount: Number of sucessfully imported revisions
277288 $pageInfo: associative array of page information
278289
279 -'AfterUserMessage': After a user message has been left, this hook is
280 -called to take care of any cleanup.
281 -$user: The user who we left the message for.
282 -$article: The article the message was left on.
283 -$subject: The subject of the message
284 -$text: The text of the message.
285 -$signature: The signature we used.
286 -$summary: The edit summary.
287 -$editor: The editor that performed the edit.
288 -
289290 'AjaxAddScript': Called in output page just before the initialisation
290291 of the javascript ajax engine. The hook is only called when ajax
291292 is enabled ( $wgUseAjax = true; ).
@@ -813,6 +814,9 @@
814815 $editToken: The user's edit token.
815816 &$hookErr: Out-param for the error. Passed as the parameters to OutputPage::showErrorPage.
816817
 818+'ExtensionTypes': called when generating the extensions credits, use this to change the tables headers
 819+&$extTypes: associative array of extensions types
 820+
817821 'FetchChangesList': When fetching the ChangesList derivative for
818822 a particular user
819823 $user: User the list is being fetched for
@@ -839,12 +843,6 @@
840844 $user: user who performed the undeletion
841845 $reason: reason
842846
843 -'FormatUserMessage': Hook to format a message if you want to override
844 -the internal formatter.
845 -$subject: Title of the message.
846 -&$text: Text of the message.
847 -$signature: Signature that they would like to leave.
848 -
849847 'GetAutoPromoteGroups': When determining which autopromote groups a user
850848 is entitled to be in.
851849 &$user: user to promote.
@@ -1132,6 +1130,9 @@
11331131 &$revert: string that is displayed in the UI, similar to $comment.
11341132 $time: timestamp of the log entry (added in 1.12)
11351133
 1134+'MaintenanceRefreshLinksInit': before executing the refreshLinks.php maintenance script
 1135+$refreshLinks: RefreshLinks object
 1136+
11361137 'MagicWordMagicWords': When defining new magic word.
11371138 DEPRECATED: use $magicWords in a file listed in
11381139 $wgExtensionMessagesFiles instead.
@@ -1159,11 +1160,6 @@
11601161 $wcOnlySysopsCanPatrol: config setting indicating whether the user
11611162 must be a sysop to patrol the edit
11621163
1163 -'MathAfterTexvc': after texvc is executed when rendering mathematics
1164 -$mathRenderer: instance of MathRenderer
1165 -$errmsg: error message, in HTML (string). Nonempty indicates failure
1166 - of rendering the formula
1167 -
11681164 'MediaWikiPerformAction': Override MediaWiki::performAction().
11691165 Use this to do something completely different, after the basic
11701166 globals have been set up, but before ordinary actions take place.
@@ -1456,16 +1452,6 @@
14571453
14581454 'SetupAfterCache': Called in Setup.php, after cache objects are set
14591455
1460 -'SetupUserMessageArticle': Called in User::leaveUserMessage() before
1461 -anything has been posted to the article.
1462 -$user: The user who we left the message for.
1463 -&$article: The article that will be posted to.
1464 -$subject: The subject of the message
1465 -$text: The text of the message.
1466 -$signature: The signature we used.
1467 -$summary: The edit summary.
1468 -$editor: The editor that performed the edit.
1469 -
14701456 'ShowMissingArticle': Called when generating the output for a non-existent page
14711457 $article: The article object corresponding to the page
14721458
@@ -1627,6 +1613,12 @@
16281614 hook to remove a core special page
16291615 $list: list (array) of core special pages
16301616
 1617+'SpecialPasswordResetOnSubmit': when executing a form submission on Special:PasswordReset
 1618+$users: array of User objects
 1619+$data: array of data submitted by the user
 1620+&$error: string, error code (message name) used to describe to error (out paramater).
 1621+ The hook needs to return false when setting this, otherwise it will have no effect.
 1622+
16311623 'SpecialRandomGetRandomTitle': called during the execution of Special:Random,
16321624 use this to change some selection criteria or substitute a different title
16331625 &$randstr: The random number from wfRandom()
@@ -1947,10 +1939,6 @@
19481940 'UserLoginForm': change to manipulate the login form
19491941 $template: SimpleTemplate instance for the form
19501942
1951 -'UserLoginMailPassword': Block users from emailing passwords
1952 -$name: the username to email the password of.
1953 -&$error: out-param - the error message to return.
1954 -
19551943 'UserLogout': before a user logs out
19561944 $user: the user object that is about to be logged out
19571945

Status & tagging log