MediaWikiServices::getInstance()->getNamespaceInfo()->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' => $tables, 'fields' => [ 'namespace' => 'page_namespace', 'title' => 'page_title', 'value' => 'rev_timestamp' ], 'conds' => $conds, 'join_conds' => $joinConds ]; } public function usesTimestamps() { return true; } function sortDescending() { return false; } public function preprocessResults( $db, $res ) { $this->executeLBFromResultWrapper( $res ); } /** * @param Skin $skin * @param object $result Result row * @return string */ function formatResult( $skin, $result ) { $d = $this->getLanguage()->userTimeAndDate( $result->value, $this->getUser() ); $title = Title::makeTitle( $result->namespace, $result->title ); $linkRenderer = $this->getLinkRenderer(); $link = $linkRenderer->makeKnownLink( $title, new HtmlArmor( MediaWikiServices::getInstance()->getContentLanguage()-> convert( htmlspecialchars( $title->getPrefixedText() ) ) ) ); return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) ); } protected function getGroupName() { return 'maintenance'; } }