From c704ec36c8df0764e63b1a5f03a6408847d85caa Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 7 Jun 2016 16:37:27 -0700 Subject: [PATCH] Use LinkCache::getSelectFields() in OutputPage::addCategoryLinks() Change-Id: I71d95cbb6c22ae92586c883e7de5353d26c4838f --- includes/OutputPage.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6f62ae65d3..ad7c97603b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1277,15 +1277,10 @@ class OutputPage extends ContextSource { # Fetch existence plus the hiddencat property $dbr = wfGetDB( DB_SLAVE ); - $fields = [ 'page_id', 'page_namespace', 'page_title', 'page_len', - 'page_is_redirect', 'page_latest', 'pp_value' ]; - - if ( $this->getConfig()->get( 'ContentHandlerUseDB' ) ) { - $fields[] = 'page_content_model'; - } - if ( $this->getConfig()->get( 'PageLanguageUseDB' ) ) { - $fields[] = 'page_lang'; - } + $fields = array_merge( + LinkCache::getSelectFields(), + [ 'page_namespace', 'page_title', 'pp_value' ] + ); $res = $dbr->select( [ 'page', 'page_props' ], $fields, -- 2.20.1