Merge "Adding number of changes info for grouped category changes"
[lhc/web/wiklou.git] / docs / hooks.txt
index 0fe888f..a431f1b 100644 (file)
@@ -178,7 +178,8 @@ once for 'TimStarling', and once for 'brion'.
 
 Hooks can return three possible values:
 
-  * true: the hook has operated successfully
+  * No return value (or null): the hook has operated successfully. Previously,
+    true was required. This is the default since MediaWiki 1.23.
   * "some string": an error occurred; processing should stop and the error
                    should be shown to the user
   * false: the hook has successfully done the work necessary and the calling
@@ -2076,17 +2077,6 @@ $rev: the new revision
 $baseID: the revision ID this was based off, if any
 $user: the editing user
 
-'NormalizeMessageKey': Called before the software gets the text of a message
-(stuff in the MediaWiki: namespace), useful for changing WHAT message gets
-displayed.
-&$key: the message being looked up. Change this to something else to change
-  what message gets displayed (string)
-&$useDB: whether or not to look up the message in the database (bool)
-&$langCode: the language code to get the message for (string) - or -
-  whether to use the content language (true) or site language (false) (bool)
-&$transform: whether or not to expand variables and templates
-  in the message (bool)
-
 'OldChangesListRecentChangesLine': Customize entire recent changes line, or
 return false to omit the line from RecentChanges and Watchlist special pages.
 &$changeslist: The OldChangesList instance.
@@ -2408,7 +2398,8 @@ $key: the section name
 &$legend: the legend text. Defaults to wfMessage( "prefs-$key" )->text() but may
   be overridden
 
-'PrefixSearchBackend': Override the title prefix search used for OpenSearch and
+'PrefixSearchBackend': DEPRECATED! Override SearchEngine::completionSearchBackend instead.
+Override the title prefix search used for OpenSearch and
 AJAX search suggestions. Put results into &$results outparam and return false.
 $ns: array of int namespace keys to search in
 $search: search term (not guaranteed to be conveniently normalized)
@@ -2924,6 +2915,14 @@ go to the existing page.
 $t: title object searched for
 &$params: an array of the default message name and page title (as parameter)
 
+'SpecialSearchGoResult': If a hook returns false the 'go' feature will be
+canceled and a normal search will be performed. Returning true without setting
+$url does a standard redirect to $title. Setting $url redirects to the
+specified URL.
+$term - The string the user searched for
+$title - The title the 'go' feature has decided to forward the user to
+&$url - Initially null, hook subscribers can set this to specify the final url to redirect to
+
 'SpecialSearchNogomatch': Called when user clicked the "Go" button but the
 target doesn't exist.
 &$title: title object generated from the text entered by the user
@@ -3076,6 +3075,11 @@ $old: old title
 $nt: new title
 $user: user who does the move
 
+'TitleMoveStarting': Before moving an article (title), but just after the atomic DB section starts.
+$old: old title
+$nt: new title
+$user: user who does the move
+
 'TitleMoveComplete': After moving an article (title), post-commit.
 &$old: old title
 &$nt: new title
@@ -3285,6 +3289,8 @@ $user: User whose groups changed
 $added: Groups added
 $removed: Groups removed
 $performer: User who performed the change, false if via autopromotion
+$reason: The reason, if any, given by the user performing the change,
+false if via autopromotion.
 
 'UserIsBlockedFrom': Check if a user is blocked from a specific page (for
 specific block exemptions).