diff options
author | Tim Starling <tstarling@wikimedia.org> | 2020-05-04 11:12:44 +1000 |
---|---|---|
committer | Tim Starling <tstarling@wikimedia.org> | 2020-05-05 11:22:04 +1000 |
commit | 2bcabb0dee018ffb12068f0ac5e1712fa2ae1138 (patch) | |
tree | ee732affa072121f84d9f3822c4c35294de8cbf7 /docs/hooks.txt | |
parent | 550f5930f2a78c72dbd6a4a1d16212e9391df978 (diff) | |
download | mediawikicore-2bcabb0dee018ffb12068f0ac5e1712fa2ae1138.tar.gz mediawikicore-2bcabb0dee018ffb12068f0ac5e1712fa2ae1138.zip |
Add $conds parameter to ModifyExportDisplayQuery hook
Since I8d825eb02c69cc66d90bd41325133fd3f99f0226, modification of the
$cond parameter to the ModifyExportDisplayQuery hook has had no effect,
since $cond is now incorporated into a condition array $conds. This
seems contrary to the purpose of the hook, although no extension in
CodeSearch actually depends on it.
It was also a documentation error, with the incorrect type on the
interface causing a Phan error in the HookRunner call site migration
patch.
So, add a $conds parameter to the hook, which allows modification of
the array, and fix the documentation.
Change-Id: Id4608cec35df56456d7dad4de107bbef816e964b
Diffstat (limited to 'docs/hooks.txt')
-rw-r--r-- | docs/hooks.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/hooks.txt b/docs/hooks.txt index 1dd8e0412937..42cb793a7eb3 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2307,9 +2307,14 @@ $mimeMagic: Instance of MimeAnalyzer. 'ModifyExportQuery': Modify the query used by the exporter. $db: The database object to be queried. &$tables: Tables in the query. -&$conds: Conditions in the query. +[&]$cond: An SQL fragment included in the WHERE clause which is used to filter + the results, for example to a specific page. Since 1.31, modification of this + parameter has no effect. Since 1.35, you can use $conds instead to modify the + array of conditions passed to IDatabase::select(). &$opts: Options for the query. &$join_conds: Join conditions for the query. +&$conds: The array of conditions to be passed to IDatabase::select(). Can be + modified. Includes the value of $cond. (Since 1.35) 'MovePageCheckPermissions': Specify whether the user is allowed to move the page. |