From: Erik Bernhardson Date: Wed, 14 Jan 2015 18:50:18 +0000 (-0800) Subject: ApiPageSet lazy loads content models X-Git-Tag: 1.31.0-rc.0~12614 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=2ddd236cdf786f02283ef3ce4cc11777598fd55e;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 );