Update formatting in maintenance/ (3/4)
[lhc/web/wiklou.git] / docs / hooks.txt
index e4037e6..80f388b 100644 (file)
@@ -839,6 +839,26 @@ ChangePassword form via the Preferences form.
 $unpatrolled: Whether or not we are showing unpatrolled changes.
 $watched: Whether or not the change is watched by the user.
 
+'ChangesListInitRows': Batch process change list rows prior to rendering.
+$changesList: ChangesList instance
+$rows: The data that will be rendered. May be a ResultWrapper instance or
+  an array.
+
+'ChangesListSpecialPageFilters': Called after building form options on pages inheriting from ChangesListSpecialPage (in core: RecentChanges, RecentChangesLinked and Watchlist).
+$special: ChangesListSpecialPage instance
+&$filters: associative array of filter definitions. The keys are the HTML
+  name/URL parameters. Each key maps to an associative array with a 'msg'
+  (message key) and a 'default' value.
+
+'ChangesListSpecialPageQuery': Called when building SQL query on pages inheriting from ChangesListSpecialPage (in core: RecentChanges, RecentChangesLinked and Watchlist).
+$name: name of the special page, e.g. 'Watchlist'
+&$tables: array of tables to be queried
+&$fields: array of columns to select
+&$conds: array of WHERE conditionals for query
+&$query_options: array of options for the database request
+&$join_conds: join conditions for the tables
+$opts: FormOptions for this request
+
 'Collation::factory': Called if $wgCategoryCollation is an unknown collation.
 $collationName: Name of the collation in question
 &$collationObject: Null. Replace with a subclass of the Collation class that
@@ -1005,6 +1025,12 @@ 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.
+$editor: EditPage instance (object)
+&$out: an OutputPage instance to write to
+return value is ignored (should alway return true)
+
 'EditPage::showStandardInputs:options': allows injection of form fields into
 the editOptions area
 $editor: EditPage instance (object)
@@ -1441,6 +1467,7 @@ $user: user (object) whose email is being invalidated
 Callee may modify $url and $query, URL will be constructed as $url . $query
 &$url: URL to index.php
 &$query: Query string
+$rc: RecentChange object that triggered url generation
 
 'IsFileCacheable': Override the result of Article::isFileCacheable() (if true)
 $article: article (object) being checked
@@ -1541,6 +1568,14 @@ before the return.
 &$attribs: the attributes to be applied.
 $linkType: The external link type
 
+'LinkerMakeMediaLinkFile': At the end of Linker::makeMediaLinkFile() just
+before the return.
+$title: the Title object that the link is pointing to
+$file: the File object or false if broken link
+&$html: the link text
+&$attribs: the attributes to be applied
+&$ret: the value to return if your hook returns false
+
 'LinksUpdate': At the beginning of LinksUpdate::doUpdate() just before the
 actual update.
 &$linksUpdate: the LinksUpdate object
@@ -2061,7 +2096,7 @@ configuration variables to JavaScript. Things that depend on the current page
 or request state must be added through MakeGlobalVariablesScript instead.
 &$vars: array( variable name => value )
 
-'ResourceLoaderGetStartupModules': Run once the startup module is being
+'ResourceLoaderGetStartupModules': DEPRECATED. Run once the startup module is being
 generated. This allows you to add modules to the startup module. This hook
 should be used sparingly since any module added here will be loaded on all
 pages. This hook is useful if you want to make code available to module loader
@@ -2363,7 +2398,7 @@ use this to change some selection criteria or substitute a different title.
   result from the normal query
 
 'SpecialRecentChangesFilters': Called after building form options at
-RecentChanges.
+RecentChanges. Deprecated, use ChangesListSpecialPageFilters instead.
 $special: the special page object
 &$filters: associative array of filter definitions. The keys are the HTML
   name/URL parameters. Each key maps to an associative array with a 'msg'
@@ -2375,7 +2410,8 @@ SpecialRecentChanges.
 $opts: FormOptions for this request
 
 'SpecialRecentChangesQuery': Called when building SQL query for
-SpecialRecentChanges and SpecialRecentChangesLinked.
+SpecialRecentChanges and SpecialRecentChangesLinked. Deprecated, use
+ChangesListSpecialPageQuery instead.
 &$conds: array of WHERE conditionals for query
 &$tables: array of tables to be queried
 &$join_conds: join conditions for the tables
@@ -2393,10 +2429,6 @@ go to the existing page.
 $t: title object searched for
 &$params: an array of the default message name and page title (as parameter)
 
-'SpecialSearchGo': Called when user clicked the "Go".
-&$title: title object generated from the text entered by the user
-&$term: the search term entered by the user
-
 '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
@@ -2430,14 +2462,6 @@ $specialSearch: SpecialSearch object ($this)
 $output: $wgOut
 $term: Search term specified by the user
 
-'SpecialSearchResultsAppend': Called after all search results HTML has
-been output.  Note that in some cases, this hook will not be called (no
-results, too many results, SpecialSearchResultsPrepend returned false,
-etc).
-$specialSearch: SpecialSearch object ($this)
-$output: $wgOut
-$term: Search term specified by the user
-
 'SpecialSearchResults': Called before search result display when there are
 matches.
 $term: string of search term
@@ -2457,7 +2481,8 @@ Special:Upload.
 $form: The SpecialUpload object
 
 'SpecialVersionExtensionTypes': Called when generating the extensions credits,
-use this to change the tables headers.
+use this to change the tables headers. Deprecated since MediaWiki 1.17, use the
+ExtensionTypes hook instead.
 $extTypes: associative array of extensions types
 
 'SpecialVersionVersionUrl': Called when building the URL for Special:Version.
@@ -2465,12 +2490,14 @@ $wgVersion: Current $wgVersion for you to use
 &$versionUrl: Raw url to link to (eg: release notes)
 
 'SpecialWatchlistFilters': Called after building form options at Watchlist.
+Deprecated, use ChangesListSpecialPageFilters instead.
 $special: the special page object
 &$filters: associative array of filter definitions. The keys are the HTML
   name/URL parameters. Each key maps to an associative array with a 'msg'
   (message key) and a 'default' value.
 
 'SpecialWatchlistQuery': Called when building sql query for SpecialWatchlist.
+Deprecated, use ChangesListSpecialPageQuery instead.
 &$conds: array of WHERE conditionals for query
 &$tables: array of tables to be queried
 &$join_conds: join conditions for the tables