$subject: Subject of the email
$body: Body of the message
+'AncientPagesQuery': Allow extensions to modify the query used by
+Special:AncientPages.
+&$tables: tables to join in the query
+&$conds: conditions for the query
+&$joinConds: join conditions for the query
+
'APIAfterExecute': After calling the execute() method of an API module. Use
this to extend core API modules.
&$module: Module object
}
public function getQueryInfo() {
+ $tables = [ 'page', 'revision' ];
+ $conds = [
+ 'page_namespace' => MWNamespace::getContentNamespaces(),
+ 'page_is_redirect' => 0
+ ];
+ $joinConds = [
+ 'revision' => [
+ 'INNER JOIN', [
+ 'page_latest = rev_id'
+ ]
+ ],
+ ];
+
+ // Allow extensions to modify the query
+ Hooks::run( 'AncientPagesQuery', [ &$tables, &$conds, &$joinConds ] );
+
return [
- 'tables' => [ 'page', 'revision' ],
+ 'tables' => $tables,
'fields' => [
'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'rev_timestamp'
],
- 'conds' => [
- 'page_namespace' => MWNamespace::getContentNamespaces(),
- 'page_is_redirect' => 0,
- 'page_latest=rev_id'
- ]
+ 'conds' => $conds,
+ 'join_conds' => $joinConds
];
}