2020-03-03 22:50:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Hook;
|
|
|
|
|
|
2020-03-16 23:31:05 +00:00
|
|
|
use Wikimedia\Rdbms\IDatabase;
|
|
|
|
|
|
2020-03-03 22:50:34 +00:00
|
|
|
/**
|
2020-09-26 13:18:43 +00:00
|
|
|
* This is a hook handler interface, see docs/Hooks.md.
|
|
|
|
|
* Use the hook name "ModifyExportQuery" to register handlers implementing this interface.
|
|
|
|
|
*
|
2020-07-13 09:05:49 +00:00
|
|
|
* @stable to implement
|
2020-03-03 22:50:34 +00:00
|
|
|
* @ingroup Hooks
|
|
|
|
|
*/
|
|
|
|
|
interface ModifyExportQueryHook {
|
|
|
|
|
/**
|
2020-03-16 23:31:05 +00:00
|
|
|
* Use this hook to modify the query used by the exporter.
|
2020-03-03 22:50:34 +00:00
|
|
|
*
|
|
|
|
|
* @since 1.35
|
|
|
|
|
*
|
2020-03-16 23:31:05 +00:00
|
|
|
* @param IDatabase $db Database object to be queried
|
|
|
|
|
* @param array &$tables Tables in the query
|
2020-05-04 01:12:44 +00:00
|
|
|
* @param string $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().
|
2020-03-16 23:31:05 +00:00
|
|
|
* @param array &$opts Options for the query
|
|
|
|
|
* @param array &$join_conds Join conditions for the query
|
2020-05-04 01:12:44 +00:00
|
|
|
* @param array &$conds The array of conditions to be passed to IDatabase::select(). Can be
|
|
|
|
|
* modified. Includes the value of $cond.
|
2020-03-03 22:50:34 +00:00
|
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
|
|
|
*/
|
2020-05-04 01:12:44 +00:00
|
|
|
public function onModifyExportQuery( $db, &$tables, $cond, &$opts,
|
|
|
|
|
&$join_conds, &$conds
|
2020-03-03 22:50:34 +00:00
|
|
|
);
|
|
|
|
|
}
|