Merge "New hook for readonly editpages"
[lhc/web/wiklou.git] / docs / hooks.txt
index e7fa89b..668cc06 100644 (file)
@@ -709,6 +709,12 @@ pages or galleries in category pages.
 $name: Image name being checked
 &$bad: Whether or not the image is "bad"
 
+'BaseTemplateAfterPortlet': After output of portlets, allow injecting
+custom HTML after the section. Any uses of the hook need to handle escaping.
+$template BaseTemplate
+$portlet: string portlet name
+&$html: string
+
 'BeforeDisplayNoArticleText': Before displaying message key "noarticletext" or
 "noarticletext-nopermission" at Article::showMissingArticle().
 $article: article object
@@ -833,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
@@ -999,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)
@@ -1435,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
@@ -1818,7 +1851,7 @@ $isMinor: Whether or not the edit was marked as minor
 $isWatch: (No longer used)
 $section: (No longer used)
 $flags: Flags passed to WikiPage::doEditContent()
-$revision: New Revision of the article
+$revision: New Revision of the article (can be null for edits that change nothing)
 $status: Status object about to be returned by doEditContent()
 $baseRevId: the rev ID (or false) this edit was based on
 
@@ -2357,7 +2390,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'
@@ -2369,7 +2402,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
@@ -2459,12 +2493,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
@@ -2910,9 +2946,9 @@ run a MediaWiki cli script.
 &$options: Associative array of options, may contain the 'php' and 'wrapper'
   keys
 
-'wgQueryPages': Called when initialising $wgQueryPages, use this to add new
-query pages to be updated with maintenance/updateSpecialPages.php.
-$query: $wgQueryPages itself
+'wgQueryPages': Called when initialising list of QueryPage subclasses, use this
+to add new query pages to be updated with maintenance/updateSpecialPages.php.
+$qp: The list of QueryPages
 
 'XmlDumpWriterOpenPage': Called at the end of XmlDumpWriter::openPage, to allow
 extra metadata to be added.