}
public function getQueryInfo() {
+ $tables = [ 'page', 'revision' ];
+ $conds = [
+ 'page_namespace' => MWNamespace::getContentNamespaces(),
+ 'page_is_redirect' => 0
+ ];
+ $joinConds = [
+ 'revision' => [
+ '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
];
}
$linkRenderer = $this->getLinkRenderer();
$link = $linkRenderer->makeKnownLink(
$title,
- MediaWikiServices::getInstance()->getContentLanguage()->
- convert( $title->getPrefixedText() )
+ new HtmlArmor( MediaWikiServices::getInstance()->getContentLanguage()->
+ convert( htmlspecialchars( $title->getPrefixedText() ) ) )
);
return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) );