From 2bcabb0dee018ffb12068f0ac5e1712fa2ae1138 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 4 May 2020 11:12:44 +1000 Subject: 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 --- docs/hooks.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/hooks.txt') 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. -- cgit v1.2.3