From 2ddd236cdf786f02283ef3ce4cc11777598fd55e Mon Sep 17 00:00:00 2001 From: Erik Bernhardson Date: Wed, 14 Jan 2015 10:50:18 -0800 Subject: [PATCH] ApiPageSet lazy loads content models A preceding patch, I7eff0bff, adjusts multiple Title methods to load the content model from the database if it is not known. This patch adjusts ApiPageSet to query for the content model with the initial data load rather than allowing the lazy loading to pull in the content model one at a time as requested. ` Bug: T86612 Change-Id: I9a9272da729d9323efde76a3c0a09f55127db537 --- includes/api/ApiPageSet.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 981c119dcb..e53e2b26fd 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -315,6 +315,10 @@ class ApiPageSet extends ApiBase { $pageFlds['page_is_redirect'] = null; } + if ( $this->getConfig()->get( 'ContentHandlerUseDB' ) ) { + $pageFlds['page_content_model'] = null; + } + // only store non-default fields $this->mRequestedPageFields = array_diff_key( $this->mRequestedPageFields, $pageFlds ); -- 2.20.1