X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialAncientpages.php;h=088b060e61c64819614cc350850d12ed5252ce18;hb=0530835635f7216cb94efbe42a28483e251d1570;hp=ff44bda1e969b9537a9d47eefb72bdb3cc36fe6d;hpb=b7a0bafb4b64a02bb209853b37b3d8939ee9ffdc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialAncientpages.php b/includes/specials/SpecialAncientpages.php index ff44bda1e9..088b060e61 100644 --- a/includes/specials/SpecialAncientpages.php +++ b/includes/specials/SpecialAncientpages.php @@ -43,18 +43,31 @@ class AncientPagesPage extends QueryPage { } 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 ]; }