Merge "Fix docs/hooks.txt syntax for SpecialSearchGoResult"
[lhc/web/wiklou.git] / docs / hooks.txt
index c91354d..be90bac 100644 (file)
@@ -375,8 +375,12 @@ $user: Current user
 processing request parameters. Return false to let the request fail, returning
 an error message or an <edit result="Failure"> tag if $resultArr was filled.
 Unlike for example 'EditFilterMergedContent' this also being run on undo.
+Since MediaWiki 1.25, 'EditFilterMergedContent' can also return error details
+for the API and it's recommended to use it instead of this hook.
 $editPage: the EditPage object
-$text: the new text of the article (has yet to be saved)
+$text: the text passed to the API. Note that this includes only the single
+  section for section edit, and is not necessarily the final text in case of
+  automatically resolved edit conflicts.
 &$resultArr: data in this array will be added to the API result
 
 'ApiFeedContributions::feedItem': Called to convert the result of ContribsPager
@@ -1837,7 +1841,7 @@ $file: the File object or false if broken link
 &$attribs: the attributes to be applied
 &$ret: the value to return if your hook returns false
 
-'LinkRendererBegin':
+'HtmlPageLinkRendererBegin':
 Used when generating internal and interwiki links in
 LinkRenderer, before processing starts.  Return false to skip default
 processing and return $ret.
@@ -1853,7 +1857,7 @@ $target: the LinkTarget that the link is pointing to
   in associative array form, with keys and values unescaped.
 &$ret: the value to return if your hook returns false.
 
-'LinkRendererEnd':
+'HtmlPageLinkRendererEnd':
 Used when generating internal and interwiki links in LinkRenderer,
 just before the function returns a value.  If you return true, an <a> element
 with HTML attributes $attribs and contents $html will be returned.  If you
@@ -2989,9 +2993,9 @@ $t: title object searched for
 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
+$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.