Merge "mediawiki.page.gallery.resize: Remove weird mw.hook call"
[lhc/web/wiklou.git] / docs / hooks.txt
index cb76341..eb4d435 100644 (file)
@@ -326,6 +326,13 @@ $revCount: Number of revisions in the XML file
 $sRevCount: Number of successfully imported revisions
 $pageInfo: associative array of page information
 
+'AfterParserFetchFileAndTitle': After an image gallery is formed by Parser,
+just before adding its HTML to parser output.
+$parser: Parser object that called the hook
+$ig: Gallery, an object of one of the gallery classes (inheriting from
+ImageGalleryBase)
+$html: HTML generated by the gallery
+
 'AjaxAddScript': Called in output page just before the initialisation
 of the javascript ajax engine. The hook is only called when ajax
 is enabled ( $wgUseAjax = true; ).
@@ -1041,11 +1048,11 @@ yourself. Alternatively, modifying $error and returning true will cause the
 contents of $error to be echoed at the top of the edit form as wikitext.
 Return true without altering $error to allow the edit to proceed.
 
-'EditPage::showReadOnlyForm:initial: similar to EditPage::showEditForm:initial
-but for the readonly 'view source' variant of the edit form.
+'EditPage::showReadOnlyForm:initial': similar to EditPage::showEditForm:initial
+but for the read-only 'view source' variant of the edit form.
 $editor: EditPage instance (object)
 &$out: an OutputPage instance to write to
-return value is ignored (should alway return true)
+return value is ignored (should always return true)
 
 'EditPage::showStandardInputs:options': allows injection of form fields into
 the editOptions area
@@ -1496,7 +1503,7 @@ $result: Change this value to override the result of wfIsTrustedProxy()
 $url: URL used to upload from
 &$allowed: Boolean indicating if uploading is allowed for given URL
 
-'isValidEmailAddr': Override the result of User::isValidEmailAddr(), for
+'isValidEmailAddr': Override the result of Sanitizer::validateEmail(), for
 instance to return false if the domain name doesn't match your organization.
 $addr: The e-mail address entered by the user
 &$result: Set this and return false to override the internal checks
@@ -1705,8 +1712,8 @@ $refreshLinks: RefreshLinks object
 'MagicWordwgVariableIDs': When defining new magic words IDs.
 $variableIDs: array of strings
 
-'MakeGlobalVariablesScript': Called right before Skin::makeVariablesScript is
-executed. Ideally, this hook should only be used to add variables that depend on
+'MakeGlobalVariablesScript': Called at end of OutputPage::getJSVars.
+Ideally, this hook should only be used to add variables that depend on
 the current page/request; static configuration should be added through
 ResourceLoaderGetConfigVars instead.
 &$vars: variable (or multiple variables) to be added into the output of
@@ -2039,6 +2046,16 @@ $oldtext : the text of the article before editing
 $subject : subject of the new section
 &$text : text of the new section
 
+'PostLoginRedirect': Modify the post login redirect behavior.
+Occurs after signing up or logging in, allows for interception of redirect.
+&$returnTo: The page name to return to, as a string
+&$returnToQuery: array of url parameters, mapping parameter names to values
+&$type: type of login redirect as string;
+  error: display a return to link ignoring $wgRedirectOnLogin
+  signup: display a return to link using $wgRedirectOnLogin if needed
+  success: display a return to link using $wgRedirectOnLogin if needed
+  successredirect: send an HTTP redirect using $wgRedirectOnLogin if needed
+
 'PreferencesGetLegend': Override the text used for the <legend> of a
 preferences section.
 $form: the PreferencesForm object. This is a ContextSource as well
@@ -2085,7 +2102,7 @@ $article: the page the form is shown for
 $out: OutputPage object
 
 'RawPageViewBeforeOutput': Right before the text is blown out in action=raw.
-&$obj: RawPage object
+&$obj: RawAction object
 &$text: The text that's going to be the output
 
 'RecentChange_save': Called at the end of RecentChange::save().
@@ -2172,12 +2189,6 @@ searches.
 $term : Search term string
 &$title : Current Title object that is being returned (null if none found).
 
-'SearchEngineReplacePrefixesComplete': Run after SearchEngine::replacePrefixes().
-$searchEngine : The SearchEngine object. Users of this hooks will be interested
-in the $searchEngine->namespaces array.
-$query : Original query.
-&$parsed : Resultant query with the prefixes stripped.
-
 'SearchResultInitFromTitle': Set the revision used when displaying a page in
 search results.
 $title : Current Title object being displayed in search results.
@@ -2350,6 +2361,10 @@ software.
 $software: The array of software in format 'name' => 'version'. See
   SpecialVersion::softwareInformation().
 
+'SpecialPageBeforeFormDisplay': Before executing the HTMLForm object.
+$name: name of the special page
+&$form: HTMLForm object
+
 'SpecialBlockModifyFormFields': Add more fields to Special:Block
 $sp: SpecialPage object, for context
 &$fields: Current HTMLForm fields